Crash on import #263

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

Projects

None yet

1 participant

@hsoft
Owner
hsoft commented Jun 22, 2013

From GS

I tried to import my latest credit card and rather than seeing the transaction as usual I had an empty screen. Then I decided to swap the description/payee as I have to do it and got the following crash

@@@
Application Name: moneyGuru
Version: 2.3.7

Traceback (most recent call last):
File "/usr/local/share/moneyguru/qt/controller/import_/window.py", line 59, in swapClicked
self.model.perform_swap(applyToAll)
File "/usr/local/share/moneyguru/core/gui/import_window.py", line 234, in perform_swap
self._swap_description_payee(apply_to_all=apply_to_all)
File "/usr/local/share/moneyguru/core/gui/import_window.py", line 177, in _swap_description_payee
self._swap_fields(panes, switch_func)
File "/usr/local/share/moneyguru/core/gui/import_window.py", line 180, in _swap_fields
entries = flatten(p.account.entries for p in panes)
File "/usr/local/share/moneyguru/hscommon/util.py", line 60, in flatten
for iterable in iterables:
File "/usr/local/share/moneyguru/core/gui/import_window.py", line 180, in
entries = flatten(p.account.entries for p in panes)
AttributeError: 'NoneType' object has no attribute 'account'
@@@

and when I selected the account I got this

@@@
Application Name: moneyGuru
Version: 2.3.7

Traceback (most recent call last):
File "/usr/local/share/moneyguru/qt/controller/import_/window.py", line 70, in targetAccountChanged
self.model.selected_target_account_index = index
File "/usr/local/share/moneyguru/core/gui/import_window.py", line 286, in selected_target_account_index
self.selected_pane.selected_target = target
AttributeError: 'NoneType' object has no attribute 'selected_target'
@@@

@hsoft hsoft closed this Jun 22, 2013
@hsoft
Owner
hsoft commented Jun 22, 2013

The key to reproducing this bug is to obtain an empty import panel, which is supposed to be impossible. I'm asking additional info to the user.

@hsoft
Owner
hsoft commented Jun 22, 2013

I finally reproduced it. I created a QIF file with 2 empty account records, with one of them having a "D" line with a valid date (so that the _parse() phase think it's a valid file). Then we end up with an empty import window popping up.

@hsoft
Owner
hsoft commented Jun 22, 2013

(from [264a224bdab8]) [#263 state:fixed] Properly detect empty QIF files.
https://bitbucket.org/hsoft/moneyguru/changeset/264a224bdab8/

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