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

Sankey graph: 'NoneType' has no attribute 'descendants' #2

Open
pmiddend opened this issue Jan 9, 2021 · 0 comments
Open

Sankey graph: 'NoneType' has no attribute 'descendants' #2

pmiddend opened this issue Jan 9, 2021 · 0 comments

Comments

@pmiddend
Copy link

pmiddend commented Jan 9, 2021

It's me again. I've tried passing cashdash my gnucash XML file. Some functionality works fine, but the Sankey graph isn't displayed. The log shows:

Traceback (most recent call last):
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/dash/dash.py", line 1457, in dispatch
    response.set_data(self.callback_map[output]["callback"](*args))
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/dash/dash.py", line 1337, in add_context
    output_value = func(*args, **kwargs)  # %% callback invoked %%
  File "/home/philipp/projekte/cashdash/cashdash/dashes/cashflow.py", line 304, in update_figure
    for node in root_liability_node.descendants:
AttributeError: 'NoneType' object has no attribute 'descendants'

Maybe something about my gnucash file that you didn't have in your sample files? Can I somehow help, without giving you access to all my finances? :D

Edit: Putting an if root_liability_node is not None around the two for loops gives me a different error message (probably a follow-up error):

Traceback (most recent call last):
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
    response = self.handle_exception(e)
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/dash/dash.py", line 1457, in dispatch
    response.set_data(self.callback_map[output]["callback"](*args))
  File "/home/philipp/projekte/cashdash/venv/lib/python3.8/site-packages/dash/dash.py", line 1337, in add_context
    output_value = func(*args, **kwargs)  # %% callback invoked %%
  File "/home/philipp/projekte/cashdash/cashdash/dashes/cashflow.py", line 353, in update_figure
    transaction_links = self.link_reconstructor.reconstruct(
  File "/home/philipp/projekte/cashdash/cashdash/algo/cvxpy_links.py", line 95, in reconstruct
    assert edges.value is not None
AssertionError

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

1 participant