Repository navigation
Conversation
```console $ BEANCOUNT_FILE=bcs/main.bc fava -p 5001 Invalid mimetype set for '.js', overriding Starting Fava on http://127.0.0.1:5001 Exception on / [GET] Traceback (most recent call last): File "./.venv/lib/python3.12/site-packages/flask/app.py", line 1455, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "./.venv/lib/python3.12/site-packages/flask/app.py", line 869, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "./.venv/lib/python3.12/site-packages/flask/app.py", line 865, in full_dispatch_request rv = self.preprocess_request() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "./.venv/lib/python3.12/site-packages/flask/app.py", line 1234, in preprocess_request url_func(request.endpoint, request.view_args) File "./.venv/lib/python3.12/site-packages/fava/application.py", line 233, in _pull_beancount_file fava_app.config["LEDGERS"] = _ledger_slugs_dict( ^^^^^^^^^^^^^^^^^^^ File "./.venv/lib/python3.12/site-packages/fava/application.py", line 106, in _ledger_slugs_dict for ledger in ledgers: File "./.venv/lib/python3.12/site-packages/fava/application.py", line 234, in <genexpr> FavaLedger(filepath) File "./.venv/lib/python3.12/site-packages/fava/core/__init__.py", line 272, in __init__ self.load_file() File "./.venv/lib/python3.12/site-packages/fava/core/__init__.py", line 279, in load_file self.all_entries, self.errors, self.options = _load( ^^^^^^ File "./.venv/lib/python3.12/site-packages/beancount/loader.py", line 501, in _load entries, parse_errors, options_map = _parse_recursive( ^^^^^^^^^^^^^^^^^ File "./.venv/lib/python3.12/site-packages/beancount/loader.py", line 371, in _parse_recursive assert path.isabs(source) AssertionError ```
Member
|
Hi, thank you for the PR :) Relative paths in this env variable seem error-prone, I'm not sure that it's good to support that. What is your use case for this, can't you put the absolute path into the env variable? |
Contributor
Author
|
I see. Keep it absolute is better, thank you. 😆 |
Member
|
I will improve the handling of this to show a better error message though :) See #1712 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support relative path string like
bcs/main.bcand pass it thruBEANCOUNT_FILE.