TypeError: Only timezones from the pytz library are supported
SergeyPirogov opened this issue · comments
Version 3b1 fails with error below:
File "/home/sergey/PycharmProjects/mitm_proxy/venv/lib/python3.7/site-packages/apscheduler/schedulers/base.py", line 420, in add_job
'trigger': self._create_trigger(trigger, trigger_args),
File "/home/sergey/PycharmProjects/mitm_proxy/venv/lib/python3.7/site-packages/apscheduler/schedulers/base.py", line 921, in _create_trigger
return self._create_plugin_instance('trigger', trigger, trigger_args)
File "/home/sergey/PycharmProjects/mitm_proxy/venv/lib/python3.7/site-packages/apscheduler/schedulers/base.py", line 906, in _create_plugin_instance
return plugin_cls(**constructor_kwargs)
File "/home/sergey/PycharmProjects/mitm_proxy/venv/lib/python3.7/site-packages/apscheduler/triggers/interval.py", line 38, in __init__
self.timezone = astimezone(timezone)
File "/home/sergey/PycharmProjects/mitm_proxy/venv/lib/python3.7/site-packages/apscheduler/util.py", line 93, in astimezone
raise TypeError('Only timezones from the pytz library are supported')
TypeError: Only timezones from the pytz library are supported
Rollback to version 2.1 fixes this
Ah, yes, that's pretty expected. Can you show a few lines of code, so I know how you use this? That would be helpful.
Version 3 at the moment by default do not return pytz timezones, but since it only supports Python 3 it can now switch to using the built in timezones in Python 3.
I use apscheduler. And from error above you can see that it fails internaly in File "/home/sergey/PycharmProjects/mitm_proxy/venv/lib/python3.7/site-packages/apscheduler/util.py", line 93,
This should be closed now that the downstream problem has been fixed in a released version.