debugging importer

65 views
Skip to first unread message

nug get

unread,
Mar 2, 2020, 2:52:53 AM3/2/20
to Beancount
Dear all,
how can I debug an importer?
I got the example from https://bitbucket.org/blais/beancount/src/default/examples/ingest/office/ working, but transferring this to my Bank's (DKB) statements using https://github.com/siddhantgoel/beancount-dkb leaves me with only the header line ";; -*- mode: beancount -*-" 
I think I understood all of siddhant's code and how it follows the structure of the bank statement. 

I tried to reverse-engineer what bean-extract is doing exactly, but this is so far more tideous than my current time constrains :)
Thanks for any hint!
-nugget
bankstatement.csv
Config.py

kuba jamro

unread,
Mar 2, 2020, 10:46:52 AM3/2/20
to Beancount
Hi,

First step is to use bean-identify. If that doesn't produce an importer for the file you have selected, then it's likely the something like the configuration does not specify a filename regular expression and therefore the csv can not be matched to an importer.

If you really fancy "debugging" an importer an IDE like PyCharm let me know and I can send over some pointers.

- Jakub.

Red S

unread,
Mar 4, 2020, 12:29:29 AM3/4/20
to Beancount
Search for 'def extract' in siddhanth's importer, and insert a few print statements there to get started.

nug get

unread,
Mar 4, 2020, 5:23:53 PM3/4/20
to Beancount
Thanks to both of you, you made me look at the right places. I had to slightly adjust the expected header format.  I got it working, finally! yey!
best, nugget
Reply all
Reply to author
Forward
0 new messages