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

Unhandled OverflowError in date parsing #394

Closed
fluffy-critter opened this issue Jun 7, 2020 · 1 comment · Fixed by #494
Closed

Unhandled OverflowError in date parsing #394

fluffy-critter opened this issue Jun 7, 2020 · 1 comment · Fixed by #494
Labels
bug Something isn't working
Milestone

Comments

@fluffy-critter
Copy link
Collaborator

Expected Behavior

dates which overflow time_t should be handled correctly

Current Behavior

Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]: INFO:publ.index:Scanning entry: /home/fluffy/dev.beesbuzz.biz/tests/content/status/deleted future.md
Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]: ERROR:publ.index:Got error parsing /home/fluffy/dev.beesbuzz.biz/tests/content/status/deleted future.md
Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]: Traceback (most recent call last):
Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]:   File "/home/fluffy/dev.beesbuzz.biz/publ/index.py", line 139, in do_scan
Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]:     return entry.scan_file(fullpath, relpath, fixup_pass)
Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]:   File "<string>", line 2, in scan_file
Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]:   File "/home/fluffy/.local/share/virtualenvs/dev.beesbuzz.biz-0UHBKC7f/lib/python3.7/site-packages/pony/orm/core.py", line 528, in new_func
Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]:     result = func(*args, **kwargs)
Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]:   File "/home/fluffy/dev.beesbuzz.biz/publ/entry.py", line 814, in scan_file
Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]:     values['display_date'] = entry_date.isoformat()
Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]:   File "/home/fluffy/.local/share/virtualenvs/dev.beesbuzz.biz-0UHBKC7f/lib/python3.7/site-packages/arrow/arrow.py", line 1374, in isoformat
Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]:     return self._datetime.isoformat(sep)
Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]:   File "/home/fluffy/.local/share/virtualenvs/dev.beesbuzz.biz-0UHBKC7f/lib/python3.7/site-packages/dateutil/tz/tz.py", line 222, in utcoffset
Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]:     if self._isdst(dt):
Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]:   File "/home/fluffy/.local/share/virtualenvs/dev.beesbuzz.biz-0UHBKC7f/lib/python3.7/site-packages/dateutil/tz/tz.py", line 291, in _isdst
Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]:     dstval = self._naive_is_dst(dt)
Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]:   File "/home/fluffy/.local/share/virtualenvs/dev.beesbuzz.biz-0UHBKC7f/lib/python3.7/site-packages/dateutil/tz/tz.py", line 260, in _naive_is_dst
Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]:     return time.localtime(timestamp + time.timezone).tm_isdst
Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]: OverflowError: timestamp out of range for platform time_t
Jun 07 10:33:51 nautilus.e-snail.us pipenv[2341]: INFO:publ.index:Scheduling fixup pass 33 for /home/fluffy/dev.beesbuzz.biz/tests/content/status/deleted future.md

and fixup passes keep getting scheduled ad infinitum

Possible Solution

Steps to Reproduce (for bugs)

Context

@fluffy-critter fluffy-critter added the bug Something isn't working label Jun 7, 2020
@fluffy-critter
Copy link
Collaborator Author

Whoops, this ended up filling up my system drive because of ridiculous log spam. At the very least there should be a bailout where there's only a maximum number of fixup passes.

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