redstreet / beancount_reds_importers

Simple ingesting tools for Beancount (plain text, double entry accounting software). More importantly, a framework to allow you to easily write your own importers.
GNU General Public License v3.0
113 stars 38 forks source link

Examples don't work for me #10

Closed nzbart closed 3 years ago

nzbart commented 3 years ago

I'm very new to Beancount and tried running the examples from your Readme, but run into the following errors:

> ./import.sh OfxDownload.qfx
**** /home/bart/.bart-beancount/beancount-env/lib/python3.9/site-packages/beancount_reds_importers/example/OfxDownload.qfx
Importer:    beancount_reds_importers.vanguard.Importer
Account:     Assets:Investments:TradIRA

ERROR:root:Importer beancount_reds_importers.vanguard.Importer.extract() raised an unexpected error: 'interest'
Traceback (most recent call last):
  File "/home/bart/.bart-beancount/beancount-env/lib/python3.9/site-packages/beancount/ingest/extract.py", line 182, in extract
    new_entries = extract_from_file(
  File "/home/bart/.bart-beancount/beancount-env/lib/python3.9/site-packages/beancount/ingest/extract.py", line 67, in extract_from_file
    new_entries = importer.extract(file, **kwargs)
  File "/home/bart/.bart-beancount/beancount-env/lib/python3.9/site-packages/beancount_reds_importers/libtransactionbuilder/investments.py", line 306, in extract
    self.initialize(file)
  File "/home/bart/.bart-beancount/beancount-env/lib/python3.9/site-packages/beancount_reds_importers/libtransactionbuilder/investments.py", line 45, in initialize
    self.build_account_map()  # TODO: avoid for identify()
  File "/home/bart/.bart-beancount/beancount-env/lib/python3.9/site-packages/beancount_reds_importers/libtransactionbuilder/investments.py", line 57, in build_account_map
    "income":    self.config['interest'],
KeyError: 'interest'
;; -*- mode: beancount -*-
 ./import.sh transactions.qfx
usage: bean-identify [-h] [--version] CONFIG_FILENAME DIR-OR-FILE [DIR-OR-FILE ...]
bean-identify: error: File does not exist: 'transactions.qfx'
usage: bean-extract [-h] [--version] [-e BEANCOUNT_FILE] [-r] CONFIG_FILENAME DIR-OR-FILE [DIR-OR-FILE ...]
bean-extract: error: File does not exist: 'transactions.qfx'

I notice that there is a transactions.qfx file in your master branch. Is the Python package out of date, or am I doing something wrong?

nzbart commented 3 years ago

I tried installing using git+https://github.com/redstreet/beancount_reds_importers, and the examples work.

redstreet commented 3 years ago

Thanks for the update and sorry about the slow response, @nzbart. I'll close this as it's fixed in master.

gety9 commented 2 years ago

@redstreet

i got same error, consider updating package to master version (cause pip3 install beancount-reds-importers installs old version)

redstreet commented 2 years ago

@gety9 done: https://github.com/redstreet/beancount_reds_importers/releases/tag/v0.4.1