-
Notifications
You must be signed in to change notification settings - Fork 21
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 Investor Won't Load (Windows-only issue?) #51
Comments
I looked further into this. It appears to be something with the investor.html file. I can delete out the tax loss harvester module (narrowed it down to deleting out lines 43 through 56) and the asset_tree macro (just the print statements in the very first |
In response to my last comment, after updating fava_investor and fiddling a little bit more, I only need to delete out a portion of the tax loss harvester, then everything works. I no longer need to mess with the asset_tree macro. Here is the portion of code that is causing the issue (lines 44-56):
Here is the code after I deleted the problem portions, which allowed everything to work (albeit missing those pieces of the table):
|
Awesome, thanks for debugging this far. I'll look into this later in the week. |
I'm having trouble reproducing this. Would you mind sharing your software versions? I'm using: Thanks. |
beancount 2.3.2 Also, I do have 95% functionality and just want to see this is great work. Thanks for putting it together. Definitely see myself using this a lot in the future. |
Can confirm this is a Windows issue. Same code works fine when I run in Docker Linux container |
Managed to figure a portion of this out. I guess for some reason (maybe Windows only as suggested by bradyemerson) jinja doesn't like reusing variable names. For lines 50-53, use new variable names (I used summary_title and summary_value) in lieu of key, value and that works. They only things which still throw it for a loop are lines 45-46, which call _('Summary') and _('Val'). I'm not sure if maybe something needs to be imported or installed for the _() function to work or if an alternate function can be used. I tried gettext() with no luck. |
@floatingheads, thanks a bunch for root causing and sharing! If you're up for submitting a PR, I'd gladly review it. If not, I'll put one in soon myself. Will leave this ticket open until the fix is in. |
@redstreet I still can't figure out why the _() function is keeping it from working. It works elsewhere in the template, just not on those lines. |
When I click the Investor link (using the included huge-example) in Fava I get a loading failed error, similar to issue #47 . I get a slew of flask and jinja errors, but the trigger is:
File "<unknown>", line 45, in template jinja2.exceptions.TemplateSyntaxError: expected token 'end of print statement', got '_'
The text was updated successfully, but these errors were encountered: