henriquebastos / gnucash-to-beancount

Gnucash to Beancount Converter.
GNU General Public License v2.0
30 stars 19 forks source link

AttributeError: 'NoneType' object has no attribute 'fullname' #13

Open lidaobing opened 5 years ago

lidaobing commented 5 years ago
$ gnucash-to-beancount family.gnucash > family.beancount
Traceback (most recent call last):
  File "/usr/local/bin/gnucash-to-beancount", line 11, in <module>
    load_entry_point('gnucash-to-beancount==1.0b0', 'console_scripts', 'gnucash-to-beancount')()
  File "/usr/local/lib/python3.7/site-packages/gnucash_to_beancount-1.0b0-py3.7.egg/gnucash_to_beancount/cli.py", line 39, in main
    entries = convert.load_entries(book)
  File "/usr/local/lib/python3.7/site-packages/gnucash_to_beancount-1.0b0-py3.7.egg/gnucash_to_beancount/convert.py", line 35, in load_entries
    entries.append(TransactionWithPostings(txn))
  File "/usr/local/lib/python3.7/site-packages/gnucash_to_beancount-1.0b0-py3.7.egg/gnucash_to_beancount/directives.py", line 144, in TransactionWithPostings
    return Transaction(txn, [Posting(split) for split in txn.splits])
  File "/usr/local/lib/python3.7/site-packages/gnucash_to_beancount-1.0b0-py3.7.egg/gnucash_to_beancount/directives.py", line 144, in <listcomp>
    return Transaction(txn, [Posting(split) for split in txn.splits])
  File "/usr/local/lib/python3.7/site-packages/gnucash_to_beancount-1.0b0-py3.7.egg/gnucash_to_beancount/directives.py", line 122, in Posting
    account = account_name(split.account)
  File "/usr/local/lib/python3.7/site-packages/gnucash_to_beancount-1.0b0-py3.7.egg/gnucash_to_beancount/directives.py", line 51, in account_name
    name = account.fullname
AttributeError: 'NoneType' object has no attribute 'fullname'