kubauk / fava-review

A Fava extension to help review transactions over a series of periods.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not build url for endpoint 'extension_report'

varac opened this issue · comments

I get this error with Fava 1.26.6 and fava-review 1.0:

Click me $ fava personal.beancount Starting Fava on http://127.0.0.1:5000 Exception on /beancount/extension/FavaReview/ [GET] Traceback (most recent call last): File "/home/varac/beancount/.direnv/python-3.11/lib/python3.11/site-packages/flask/app.py", line 1455, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/varac/beancount/.direnv/python-3.11/lib/python3.11/site-packages/flask/app.py", line 869, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/varac/beancount/.direnv/python-3.11/lib/python3.11/site-packages/flask/app.py", line 867, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/home/varac/beancount/.direnv/python-3.11/lib/python3.11/site-packages/flask/app.py", line 852, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/varac/beancount/.direnv/python-3.11/lib/python3.11/site-packages/fava/application.py", line 349, in extension_report content = Markup(template.render(ledger=g.ledger, extension=ext)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/varac/beancount/.direnv/python-3.11/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render self.environment.handle_exception() File "/home/varac/beancount/.direnv/python-3.11/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception raise rewrite_traceback_stack(source=source) File "/home/varac/beancount/.direnv/python-3.11/lib/python3.11/site-packages/fava_review/templates/FavaReview.html", line 44, in top-level template code {{ value[0] }} ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/varac/beancount/.direnv/python-3.11/lib/python3.11/site-packages/fava/application.py", line 146, in url_for return _cached_url_for(endpoint, **values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/varac/beancount/.direnv/python-3.11/lib/python3.11/site-packages/flask/helpers.py", line 222, in url_for return current_app.url_for( ^^^^^^^^^^^^^^^^^^^^ File "/home/varac/beancount/.direnv/python-3.11/lib/python3.11/site-packages/flask/app.py", line 1071, in url_for return self.handle_url_build_error(error, endpoint, values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/varac/beancount/.direnv/python-3.11/lib/python3.11/site-packages/flask/app.py", line 1060, in url_for rv = url_adapter.build( # type: ignore[union-attr] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/varac/beancount/.direnv/python-3.11/lib/python3.11/site-packages/werkzeug/routing/map.py", line 919, in build raise BuildError(endpoint, values, method, self) werkzeug.routing.exceptions.BuildError: Could not build url for endpoint 'extension_report' with values ['bfile', 'report_name', 'view']. Did you forget to specify values ['extension_name']?

I am using this to load the extension in my personal.beancount file:

2010-01-01 custom "fava-extension" "fava_review" "{}"

Maybe related: #10

Hi, I've had a look into this and it's likely because there was quite a big change between fava 1.24 and 1.25.

I am looking into adapting the code to support the 1.25+ changes but for the time being if you would like to use fava-review I would suggest you downgrade fava to 1.24.4

This has now been fixed. There were big changes to fava on version 1.25 that were breaking. fava-review has now been updated to support the changes