Exception raised if new balance record (record id 8) is missing
We recently received a couple of "empty" coda files from the bank. On a side-note: they were produced in a time-frame where the bank in question was "merging", and it probably stopped some of its back-end processes for a day or two.
Anyways, such "empty" coda file had records with identifier 0, 1, and 9 - but nothing else. As far as I can make out that makes up a valid coda file.
The parser fails on that situation: after record type "9" is parsed it expects to have a new balance, which is not the case with such file.
For info, I applied following change on my local copy, in order to cope with this:
if (statement.number_records == 1) and (statement.old_balance is not None):
statement.new_balance = statement.old_balance
statement.new_balance_date = statement.old_balance_date