I am writing an importer and I get an error when I try to create a balance entry. I am not sure if it is a bug or an issue with what I am doing.
I have tested the code to create the balance entry separately and it creates a balance entry allright. But tracing the error it seems to run into problems when it tries to print all my entries.
Does this ring a bell as to something I am clearly doing wrong or should I just post this as a potential bug to be investigated?
The error I get when executing bean-extract:
Traceback (most recent call last):
File "/home/alvaroaguilar/.envs/beancount/bin/bean-extract", line 33, in <module>
sys.exit(load_entry_point('beancount==2.3.4', 'console_scripts', 'bean-extract')())
File "/home/alvaroaguilar/.envs/beancount/lib/python3.6/site-packages/beancount/ingest/scripts_utils.py", line 36, in extract_main
return trampoline_to_ingest(extract)
File "/home/alvaroaguilar/.envs/beancount/lib/python3.6/site-packages/beancount/ingest/scripts_utils.py", line 198, in trampoline_to_ingest
return run_import_script_and_ingest(parser)
File "/home/alvaroaguilar/.envs/beancount/lib/python3.6/site-packages/beancount/ingest/scripts_utils.py", line 246, in run_import_script_and_ingest
return ingest(importers_list)
File "/home/alvaroaguilar/.envs/beancount/lib/python3.6/site-packages/beancount/ingest/scripts_utils.py", line 140, in ingest
args.command(args, parser, importers_list, abs_downloads, hooks=hooks)
File "/home/alvaroaguilar/.envs/beancount/lib/python3.6/site-packages/beancount/ingest/extract.py", line 248, in run
hooks=hooks)
File "/home/alvaroaguilar/.envs/beancount/lib/python3.6/site-packages/beancount/ingest/extract.py", line 214, in extract
print_extracted_entries(new_entries, output)
File "/home/alvaroaguilar/.envs/beancount/lib/python3.6/site-packages/beancount/ingest/extract.py", line 137, in print_extracted_entries
entry_string = printer.format_entry(entry)
File "/home/alvaroaguilar/.envs/beancount/lib/python3.6/site-packages/beancount/parser/printer.py", line 369, in format_entry
return EntryPrinter(dcontext, render_weights, prefix=prefix)(entry)
File "/home/alvaroaguilar/.envs/beancount/lib/python3.6/site-packages/beancount/parser/printer.py", line 123, in __call__
method(obj, oss)
File "/home/alvaroaguilar/.envs/beancount/lib/python3.6/site-packages/beancount/parser/printer.py", line 271, in Balance
if isinstance(entry.amount.number, Decimal)
AttributeError: 'int' object has no attribute 'number'