You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/usr/bin/bean-check", line 33, in <module>
sys.exit(load_entry_point('beancount==2.3.5', 'console_scripts', 'bean-check')())
File "/usr/lib/python3.10/site-packages/beancount/scripts/check.py", line 49, in main
entries, errors, _ = loader.load_file(
File "/usr/lib/python3.10/site-packages/beancount/loader.py", line 90, in load_file
entries, errors, options_map = _load_file(
File "/usr/lib/python3.10/site-packages/beancount/loader.py", line 215, in wrapped
result = function(toplevel_filename, *args, **kw)
File "/usr/lib/python3.10/site-packages/beancount/loader.py", line 256, in _uncached_load_file
return _load([(filename, True)], *args, **kw)
File "/usr/lib/python3.10/site-packages/beancount/loader.py", line 507, in _load
entries, balance_errors = booking.book(entries, options_map)
File "/usr/lib/python3.10/site-packages/beancount/parser/booking.py", line 40, in book
entries, booking_errors = booking_full.book(incomplete_entries, options_map,
File "/usr/lib/python3.10/site-packages/beancount/parser/booking_full.py", line 112, in book
entries, errors, _ = _book(entries, options_map, methods)
File "/usr/lib/python3.10/site-packages/beancount/parser/booking_full.py", line 193, in _book
interpolated) = interpolate_group(booked_postings, balances, currency,
File "/usr/lib/python3.10/site-packages/beancount/parser/booking_full.py", line 855, in interpolate_group
units_number = interpolate.quantize_with_tolerance(tolerances,
File "/usr/lib/python3.10/site-packages/beancount/core/interpolate.py", line 354, in quantize_with_tolerance
number = number.quantize(quantum)
decimal.InvalidOperation: [<class 'decimal.InvalidOperation'>]
I encountered this on a bean file generated by a script. Here's a minimal reproducible example:
Doing
bean-check
raisesdecimal.InvalidOperation: [<class 'decimal.InvalidOperation'>]
exception:Beancount version:
Beancount 2.3.5 (git:b40819f4; 2022-07-28)
The exception is not raised if
option "inferred_tolerance_default" "CAD:0.01"
is enabled.I'm not sure but this issue might be related to: #584
The text was updated successfully, but these errors were encountered: