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

QIF import : error #497

Closed
FrenchPhi opened this Issue Nov 4, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@FrenchPhi

FrenchPhi commented Nov 4, 2017

I get this error when importing a QIF file

Application Identifier: com.hardcoded-software.moneyguru
Application Version: 2.11.0-1
Mac OS X Version: Version 10.12.6 (assemblage 16G1036)

Traceback (most recent call last):
  File "/Applications/moneyGuru.app/Contents/Resources/mg_cocoa.py", line 1104, in import_
    self.model.parse_file_for_import(filename)
  File "build/moneyGuru.app/Contents/Resources/py/core/gui/main_window.py", line 466, in parse_file_for_import
  File "build/moneyGuru.app/Contents/Resources/py/core/gui/main_window.py", line 366, in load_parsed_file_for_import
  File "build/moneyGuru.app/Contents/Resources/py/core/loader/base.py", line 378, in load
  File "build/moneyGuru.app/Contents/Resources/py/core/model/currency.py", line 391, in ensure_rates
OverflowError: date value out of range

I tried to simplify my QIF file to identify the problem ; same issue.
Here's the QIF's content.

!Type:Bank
D2/3/2004
T579
CX
PSolde
L[Courant]
^

Thanks for help !

@FrenchPhi

This comment has been minimized.

FrenchPhi commented Nov 4, 2017

It works well using version 2.7.2

@hsoft hsoft added the bug label Nov 4, 2017

@hsoft

This comment has been minimized.

Owner

hsoft commented Nov 4, 2017

Thanks for reporting the error and for the minimal QIF.

I couldn't reproduce the issue with your supplied QIF, but I think I can see where the error comes from. If I'm correct, it stems from a previous import you would have done that messed up your currency rates cache. I'll be trying to find that faulty import situation, but meanwhile, I would have two questions for you:

  1. If you quit and restart moneyGuru, does the problem persist?
  2. Normally, if the root cause is what I think it is, you won't be able to import anything at all with v2.11. You will always get this error. Is this the case?

@hsoft hsoft self-assigned this Nov 4, 2017

@FrenchPhi

This comment has been minimized.

FrenchPhi commented Nov 4, 2017

I can't reproduce the issue anymore ...
But you're right, I tried several imports with 'incorrect format' ; QIF had wrong date format (dd/mm'yyyy).

I completely deleted v2.11 to install v2.7.2. And now I re-use v2.11 and it seems to work properly with my minimal QIF.

I don't know what could happen.

@hsoft

This comment has been minimized.

Owner

hsoft commented Nov 4, 2017

Got it. It's not so much a matter of importing a file with invalid dates (these are properly caught and processed) as much as importing a QIF with no transaction and a "date" line somewhere. For example:

!Type:Bank
D2/3/2004
^

After having imported that, the in-memory currency cache becomes confused and we'll get the crash you were getting when trying to import anything at all.

@hsoft hsoft closed this in 0f46998 Nov 4, 2017

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