-
Notifications
You must be signed in to change notification settings - Fork 20
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
[Feature] Write errors to GUI callout instead of exiting #74
Comments
From what I can tell, there are a few separate asks here:
Anything else? Could you please file separate issues for each issue? This makes it easier to discuss each of them. Thanks! |
Number one is the main one, for which I created the issue. The other two are side issues, of this. I guess, allowing to filter accounts would be a very nice feature, though. Created |
To clarify: Investor doesn't crash, but catches the error and exits (important distinction). Agreed, if there is a persistent GUI callout, I'd be okay using that instead. Contributions welcome. I'm unlikely to get to this soon. Note that a solution would have to work for the command line and library as well. |
TLDR
If fava_investor hits some errors it writes to stderr, which leads fava to crash/exit with error code 1.
It would be nicer to display a warning callout instead—just like the
notification.
Two examples:
No asset allocation account found
This will print error specificed in
fava_investor/fava_investor/modules/assetalloc_class/libassetalloc.py
Line 162 in 48641b9
Related: #76
One could argue that it doesn't make sense to include a non-existing account. But:
With this config I can compare my investments and the amount of cash I'm holding. If I wanted to know the ratios of my investments I need to exclude the cash accounts. I'd do it in fava via the GUI, but it "breaks" fava:
(I'm running fava as a linux service unit)
The only way to exclude accounts is by changing the config and restarting fava. It would be way nicer to leverage the powerful webUI for excluding specific accounts temporarily.
Why is this useful? Well, besides the cash example, if there's real estate in your assets it normally makes 70-90% of your asset allocation. This makes it hard to see if you're overexposed to another investment.
Error: unable to convert PRICE to base currency XY
If you didn't explicitly add a
price
directive for an exit, fava_investor prints this error messagefava_investor/fava_investor/modules/assetalloc_class/libassetalloc.py
Line 112 in 48641b9
So, a bean containing this:
Would "break" fava because of the stderr message. You need to explicitly add a price directive for
NEWASSET
:(Actually, this is also a feature request: #77 import/use the implicit prices that are added to postings)
The text was updated successfully, but these errors were encountered: