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

Invalid date causing crash on save #274

Closed
hsoft opened this Issue Jun 22, 2013 · 2 comments

Comments

Projects
None yet
1 participant
@hsoft
Owner

hsoft commented Jun 22, 2013

@@@
Application Identifier: com.hardcoded_software.moneyguru
Application Version: 2.3.9

Traceback (most recent call last):
File "/Applications/moneyGuru.app/Contents/Resources/mg_cocoa.plugin/Contents/Resources/mg_cocoa.py", line 213, in saveToFile_
File "core/document.pyc", line 720, in save_to_xml
File "core/saver/native.pyc", line 73, in save
File "core/saver/native.pyc", line 35, in write_transaction_element
File "core/saver/native.pyc", line 17, in date2str
ValueError: year=211 is before 1000; the datetime strftime() methods require year >= 1000
@@@

It seems like the date widget mistakenly allowed "211" as a valid year, ultimately causing a crash on save.

@hsoft hsoft closed this Jun 22, 2013

@hsoft

This comment has been minimized.

Owner

hsoft commented Jun 22, 2013

Ahhh, I almost gave up, but I finally found it: bad imports. Take a CSV, and add a date like "01/01/0211" (it's important that the year has 4 digits), and you'll end up with this error when you try to save this document.

We should just be more strict about stuff we import (date year should be > 1000)

@hsoft

This comment has been minimized.

Owner

hsoft commented Jun 22, 2013

(from [bdd8eb5c5277]) [#274 state:fixed] Fixed a bug causing imports to sometimes let bad dates through.
https://bitbucket.org/hsoft/moneyguru/changeset/bdd8eb5c5277/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment