Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifier crashes due to incompatible date times being compared #1878

Closed
fniessink opened this issue Jan 31, 2021 · 0 comments · Fixed by #1880
Closed

Notifier crashes due to incompatible date times being compared #1878

fniessink opened this issue Jan 31, 2021 · 0 comments · Fixed by #1880
Labels
Bug Something isn't working

Comments

@fniessink
Copy link
Member

Traceback (most recent call last):
notifier_1       |   File "/home/notifier/quality_time_notifier.py", line 112, in <module>
notifier_1       |     asyncio.run(notify(logging.INFO))  # pragma: no cover
notifier_1       |   File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
notifier_1       |     return loop.run_until_complete(main)
notifier_1       |   File "/usr/local/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
notifier_1       |     return future.result()
notifier_1       |   File "/home/notifier/quality_time_notifier.py", line 43, in notify
notifier_1       |     most_recent_measurement_seen = most_recent_measurement_timestamp(json)
notifier_1       |   File "/home/notifier/quality_time_notifier.py", line 73, in most_recent_measurement_timestamp
notifier_1       |     most_recent = max(most_recent, datetime.fromisoformat(recent_measurements[-1]["end"]))
notifier_1       | TypeError: can't compare offset-naive and offset-aware datetimes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant