You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have checked that my issue does not already have a solution in the FAQ
I have searched the existing issues and didn't find my bug already reported there
I have checked that my bug is still present in the latest release
Version
APScheduler 3.9.1
What happened?
D:\software\Python27\python.exe D:/pySpace/aps_test.py
Traceback (most recent call last):
File "D:/pySpace/aps_test.py", line 19, in
myAPS.start()
File "D:\software\Python27\lib\site-packages\apscheduler\schedulers\background.py", line 35, in start
BaseScheduler.start(self, *args, **kwargs)
File "D:\software\Python27\lib\site-packages\apscheduler\schedulers\base.py", line 167, in start
self._real_add_job(job, jobstore_alias, replace_existing)
File "D:\software\Python27\lib\site-packages\apscheduler\schedulers\base.py", line 863, in _real_add_job
replacements['next_run_time'] = job.trigger.get_next_fire_time(None, now)
File "D:\software\Python27\lib\site-packages\apscheduler\triggers\interval.py", line 68, in get_next_fire_time
return normalize(next_fire_time)
File "D:\software\Python27\lib\site-packages\apscheduler\util.py", line 431, in normalize
return datetime.fromtimestamp(dt.timestamp(), dt.tzinfo)
AttributeError: 'datetime.datetime' object has no attribute 'timestamp'
This bug was introduced some time in the later releases, but since Python 2.7 reached its end of life almost 3 years ago, I decided not to spend a lot of time fixing it (my early attempts failed). If you are unable to switch to Python 3 for whatever reason, you need to downgrade your APScheduler to 3.8.1.
Things to check first
I have checked that my issue does not already have a solution in the FAQ
I have searched the existing issues and didn't find my bug already reported there
I have checked that my bug is still present in the latest release
Version
APScheduler 3.9.1
What happened?
D:\software\Python27\python.exe D:/pySpace/aps_test.py
Traceback (most recent call last):
File "D:/pySpace/aps_test.py", line 19, in
myAPS.start()
File "D:\software\Python27\lib\site-packages\apscheduler\schedulers\background.py", line 35, in start
BaseScheduler.start(self, *args, **kwargs)
File "D:\software\Python27\lib\site-packages\apscheduler\schedulers\base.py", line 167, in start
self._real_add_job(job, jobstore_alias, replace_existing)
File "D:\software\Python27\lib\site-packages\apscheduler\schedulers\base.py", line 863, in _real_add_job
replacements['next_run_time'] = job.trigger.get_next_fire_time(None, now)
File "D:\software\Python27\lib\site-packages\apscheduler\triggers\interval.py", line 68, in get_next_fire_time
return normalize(next_fire_time)
File "D:\software\Python27\lib\site-packages\apscheduler\util.py", line 431, in normalize
return datetime.fromtimestamp(dt.timestamp(), dt.tzinfo)
AttributeError: 'datetime.datetime' object has no attribute 'timestamp'
How can we reproduce the bug?
pip list
Package Version
APScheduler 3.9.1
funcsigs 1.0.2
futures 3.3.0
pip 20.3.4
pytz 2022.2.1
setuptools 44.1.1
six 1.16.0
tzlocal 2.1
The text was updated successfully, but these errors were encountered: