awesterb / koert

Toolbox for the inspection of GnuCash (used by the financial control committee of Karpe Noktem).
4 stars 2 forks source link

GnuCash 3 support #4

Open aykevl opened 6 years ago

aykevl commented 6 years ago

Apparently GnuCash 3 (or at least 3.3) changed the file format, which broke koert.

Traceback (most recent call last):
  File "/home/sys-moniek/kninfra/utils/moniek.py", line 11, in <module>
    Moniek().run()
  File "/home/sys-moniek/kninfra/kn/utils/moniek/__init__.py", line 25, in __init__
    self.gcf_by_year(year)
  File "/home/sys-moniek/kninfra/kn/utils/moniek/__init__.py", line 65, in gcf_by_year
    updated_gcf = koerttools.open_yaml(path, onlyafter=onlyafter)
  File "/home/sys-moniek/py/koert/gnucash/tools.py", line 172, in open_yaml
    gcf.book.ac_by_path(d['opening balance']).is_opening_balance = True
  File "/home/sys-moniek/py/koert/gnucash/core.py", line 163, in ac_by_path
    ac, bit))
KeyError: '<ac> has no child named Vermogen'

I haven't yet investigated why.

aykevl commented 6 years ago

Ah, looks like a configuration issue.