New issue 395: Using `bean-price --all` causes an error
https://bitbucket.org/blais/beancount/issues/395/using-bean-price-all-causes-an-error
lucassz:
When running a command such as `bean-price --all main.bean`, I get the
following error:
```
Traceback (most recent call last):
File
"/usr/local/lib/python3.7/site-packages/beancount/prices/find_prices.py", line
147, in import_source
__import__(default_name)
ModuleNotFoundError: No module named 'beancount.prices.sources.True'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/bean-price", line 4, in <module>
from beancount.prices.price import main; main()
File "/usr/local/lib/python3.7/site-packages/beancount/prices/price.py", line
354, in main
args, jobs, entries, dcontext = process_args()
File "/usr/local/lib/python3.7/site-packages/beancount/prices/price.py", line
347, in process_args
entries, args.date, args.inactive, args.undeclared))
File
"/usr/local/lib/python3.7/site-packages/beancount/prices/find_prices.py", line
366, in get_price_jobs_at_date
default_source = import_source(undeclared_source)
File
"/usr/local/lib/python3.7/site-packages/beancount/prices/find_prices.py", line
151, in import_source
__import__(module_name)
TypeError: __import__() argument 1 must be str, not bool
```
Based on my debugging, it seems that this is because the [--undeclared argument
is being set to
True](https://github.com/beancount/beancount/blob/19c8160fbaa29fd71aa3ad0d5b32f16a8397de0b/beancount/prices/price.py#L309),
whereas it needs to specify a default source as indicated in the documentation
for the --undeclared option.
--
You received this message because you are subscribed to the Google Groups
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beancount/20190526034013.2122.48987%40celery-worker-111.ash1.bb-inf.net.
For more options, visit https://groups.google.com/d/optout.