Menu

1 / 5

Fixing a Python fromisoformat Error Unmasked a Stale Alarm That Had to Fire

DEV Community: python·John·2 days ago
#YbuiKQyh
#devtopython#devto#dev#build#newest
Reading 0:00
15s threshold

Originally published on hexisteme notes .

At 21:00 on October 9, and again at 09:00 the next morning, the snapshot job in my agent telemetry pipeline raised this alert:

F3-SOURCE-CHECK-ERROR: argument --since: not an ISO-8601 timestamp: '1970-01-01T00:00:00Z'

Enter fullscreen mode

Exit fullscreen mode

The alert's wording pointed at suspected loss of the raw archive. Nothing had been lost. The archive copy was working, and its newest file was from 08:59 that morning. What failed was a source-freshness check inside the same job. The parse error was the easy part; what it had been covering up was the real lesson.

Python 3.9 and a trailing Z

Under cron's PATH, python3 resolved to /usr/bin/python3 , which is 3.9.6. Before 3.11, datetime.fromisoformat does not accept a trailing Z , and the job passes --since 1970-01-01T00:00:00Z . My interactive shell runs 3.13, so nothing reproduced by hand.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.