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

Fava 1.26.2 breaks fava _investor #86

Closed
CJKohler opened this issue Nov 26, 2023 · 3 comments
Closed

Fava 1.26.2 breaks fava _investor #86

CJKohler opened this issue Nov 26, 2023 · 3 comments

Comments

@CJKohler
Copy link

when trying to import fava_investor, I get the following error:

 
File "/Beancount/.venv/lib/python3.11/site-packages/fava_investor/common/favainvestorapi.py", line 2, in <module>
    from fava.template_filters import cost_or_value
ImportError: cannot import name 'cost_or_value' from 'fava.template_filters' (/Beancount/.venv/lib/python3.11/site-packages/fava/template_filters.py)

When I look in Fava 1.26 the cost_or_value function is there, but it is gone in 1.26.1 and 1.26.2
pip3 install --force-reinstall fava==1.26
Now at least I can import fava_investor without problems.

@CJKohler
Copy link
Author

Another issue is the fact that _charts.html has been removed from Fava after 1.25 which causes the following error:
File "/Beancount/.venv/lib/python3.11/site-packages/fava_investor/templates/Investor.html", line 2, in top-level template code {% import "_charts.html" as charts with context %} ^^^^^^^^^^^^^^^^^^^^^^^^^ jinja2.exceptions.TemplateNotFound: _charts.html

@redstreet
Copy link
Owner

redstreet commented Nov 28, 2023

Thanks for filing this. I've fixed requirements.txt to reflect this.

There are at least a couple tickets on getting fava_investor to be compatible with new versions of fava. I just haven't had the time to make the fixes needed. PRs welcome, else I should be able to get to it in a few weeks.

@redstreet
Copy link
Owner

See #84. This should be fixed now.

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

2 participants