Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash when using tags #11

Closed
Akuukis opened this issue Apr 12, 2020 · 1 comment
Closed

crash when using tags #11

Akuukis opened this issue Apr 12, 2020 · 1 comment

Comments

@Akuukis
Copy link
Owner

Akuukis commented Apr 12, 2020

Reproduce: use #split-month and see fava burn. Problem line: tx.meta.pop('split'). I guess we need to check if split exists in meta first, as well clean the tags also.

Stacktrace

Exception on / [GET]
Traceback (most recent call last):
  File "$HOME/.local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "$HOME/.local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "$HOME/.local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "$HOME/.local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "$HOME/.local/lib/python3.8/site-packages/flask/app.py", line 1948, in full_dispatch_request
    rv = self.preprocess_request()
  File "$HOME/.local/lib/python3.8/site-packages/flask/app.py", line 2236, in preprocess_request
    func(request.endpoint, request.view_args)
  File "$HOME/.local/lib/python3.8/site-packages/fava/application.py", line 234, in _pull_beancount_file
    _load_file()
  File "$HOME/.local/lib/python3.8/site-packages/fava/application.py", line 101, in _load_file
    ledger = FavaLedger(filepath)
  File "$HOME/.local/lib/python3.8/site-packages/fava/core/__init__.py", line 175, in __init__
    self.load_file()
  File "$HOME/.local/lib/python3.8/site-packages/fava/core/__init__.py", line 182, in load_file
    self.all_entries, self.errors, self.options = loader._load(
  File "$HOME/.local/lib/python3.8/site-packages/beancount/loader.py", line 476, in _load
    entries, errors = run_transformations(entries, parse_errors, options_map,
  File "$HOME/.local/lib/python3.8/site-packages/beancount/loader.py", line 551, in run_transformations
    entries, plugin_errors = callback(entries, options_map,
  File "$HOME/.local/lib/python3.8/site-packages/beancount_interpolate/split.py", line 6, in split
    return interpolate_subset(entries, options_map, {'split': config_string})
  File "$HOME/.local/lib/python3.8/site-packages/beancount_interpolate/interpolate.py", line 63, in interpolate_subset
    entries, command_errors = commands_to_functions_map[command](entries, config_map[command])
  File "$HOME/.local/lib/python3.8/site-packages/beancount_interpolate/interpolate.py", line 201, in split
    tx.meta.pop('split')
KeyError: 'split'

@Akuukis
Copy link
Owner Author

Akuukis commented Jun 25, 2020

Fixed by #14

@Akuukis Akuukis closed this as completed Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant