-
Notifications
You must be signed in to change notification settings - Fork 382
Can't get Python import to work inside the import-config file #2271
Open
Description
I'm getting the following error when trying beangulp example importers with Fava:
Error in import config '/home/qqq/beangulp/examples/import.py': Traceback (most recent call last):
File "/home/qqq/beancount/.venv/lib/python3.12/site-packages/fava/core/ingest.py", line 331, in load_import_config
mod = run_path(str(module_path))
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen runpy>", line 286, in run_path
File "<frozen runpy>", line 98, in _run_module_code
File "<frozen runpy>", line 88, in _run_code
File "/home/qqq/beangulp/examples/import.py", line 3, in <module>
from importers import acme
ModuleNotFoundError: No module named 'importers'
I've added the import-config option to the ledger file as follows:
2000年01月01日 custom "fava-option" "import-config" "../import.py"
This line seems to be effective because import.py is obviously invoked by Fava, but it's having trouble finding the Python modules that are in the same directory as import.py.
What am I missing here?
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.