seltzered / fava-classy-portfolio

Fava Extension for viewing your financial portfolio kept in a Beancount plaintext accounting ledger.
22 stars 5 forks source link

Blank screen in fava-classy-portfolio page #4

Open grostim opened 4 years ago

grostim commented 4 years ago

Hi!

I am using fava, version 1.13.dev12+g84df3df6 and fava-classy-portfolio @ 5732cac . When i try to load the fava-classy-portfolio page, i have a blank screen.

image

There are no error message in the chrome developper tool console.

In the fava debug log, i hav found the following:

Traceback (most recent call last):
  File "/myData/fava-classy-portfolio/__init__.py", line 71, in portfolio_accounts
    tree, end, option[1][0], option[1][1]
  File "/myData/fava-classy-portfolio/__init__.py", line 146, in _account_metadata_pattern
    selected_nodes = [tree[x] for x in selected_accounts]
  File "/myData/fava-classy-portfolio/__init__.py", line 146, in <listcomp>
    selected_nodes = [tree[x] for x in selected_accounts]
KeyError: 'Actif:Linxea:AVTim1:FR0010434019'
Traceback (most recent call last):
  File "/myData/fava-classy-portfolio/__init__.py", line 82, in portfolio_accounts
    True),
  File "/myData/fava-classy-portfolio/__init__.py", line 403, in insert_rowspans
    False)
  File "/myData/fava-classy-portfolio/__init__.py", line 438, in insert_rowspans
    False)
  File "/myData/fava-classy-portfolio/__init__.py", line 459, in insert_rowspans
    data[key][coltype[0]], {"rowspan": 1})
KeyError: 'asset_subclass_allocation'
Traceback (most recent call last):
  File "/myData/fava-classy-portfolio/__init__.py", line 82, in portfolio_accounts
    True),
  File "/myData/fava-classy-portfolio/__init__.py", line 403, in insert_rowspans
    False)
  File "/myData/fava-classy-portfolio/__init__.py", line 438, in insert_rowspans
    False)
  File "/myData/fava-classy-portfolio/__init__.py", line 459, in insert_rowspans
    data[key][coltype[0]], {"rowspan": 1})
KeyError: 'asset_subclass_allocation'
Traceback (most recent call last):
  File "/myData/fava-classy-portfolio/__init__.py", line 82, in portfolio_accounts
    True),
  File "/myData/fava-classy-portfolio/__init__.py", line 403, in insert_rowspans
    False)
  File "/myData/fava-classy-portfolio/__init__.py", line 438, in insert_rowspans
    False)
  File "/myData/fava-classy-portfolio/__init__.py", line 459, in insert_rowspans
    data[key][coltype[0]], {"rowspan": 1})
KeyError: 'asset_subclass_allocation'
Traceback (most recent call last):
  File "/myData/fava-classy-portfolio/__init__.py", line 82, in portfolio_accounts
    True),
  File "/myData/fava-classy-portfolio/__init__.py", line 403, in insert_rowspans
    False)
  File "/myData/fava-classy-portfolio/__init__.py", line 438, in insert_rowspans
    False)
  File "/myData/fava-classy-portfolio/__init__.py", line 459, in insert_rowspans
    data[key][coltype[0]], {"rowspan": 1})
KeyError: 'asset_subclass_allocation'
Traceback (most recent call last):
  File "/myData/fava-classy-portfolio/__init__.py", line 82, in portfolio_accounts
    True),
  File"/myData/fava-classy-portfolio/__init__.py", line 403, in insert_rowspans
    False)
  File "/myData/fava-classy-portfolio/__init__.py", line 438, in insert_rowspans
    False)
  File "/myData/fava-classy-portfolio/__init__.py", line 459, in insert_rowspans
    data[key][coltype[0]], {"rowspan": 1})
KeyError: 'asset_subclass_allocation'
seltzered commented 4 years ago

Hi, I've tried to play around with some variations and haven't been able to reproduce. Could you make a sample beancount file that results in the same error?

Note: I haven't attempted to internationalize the code yet, so wondering if there's any differences in account/metadata namings (e.g. "Actif" instead of "Assets") causing issues.