Giter Club home page Giter Club logo

cashdash's People

Contributors

mbugert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

l-ray

cashdash's Issues

Sample is beautiful. Myfile not so much ! AttributeError: 'NoneType' object has no attribute 'find'

I've a large gnucash file from version 4.9+(2021-12-18) --- it's 1.4MB gunzipped
if it's unzipped i get traceback gzip.BadGzipFile: Not a gzipped file (b'<?')

it it is gzip I get the following traceback:
Traceback (most recent call last):
File "app.py", line 21, in
run()
File "/home/user1/cashdash/venv/lib/python3.8/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/home/user1/cashdash/venv/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/user1/cashdash/venv/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/user1/cashdash/venv/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "app.py", line 16, in run
app = create_app(data_path, backend=backend)
File "/home/user1/cashdash/cashdash/init.py", line 22, in create_app
data = reader.read(data_path)
File "/home/user1/cashdash/cashdash/data/gnucash.py", line 23, in read
gc_file = gnucashxml.from_filename(path)
File "/home/user1/cashdash/venv/lib/python3.8/site-packages/gnucashxml.py", line 286, in from_filename
return parse(gzip.open(filename, "rb"))
File "/home/user1/cashdash/venv/lib/python3.8/site-packages/gnucashxml.py", line 308, in parse
return _book_from_tree(root.find("{http://www.gnucash.org/XML/gnc}book"))
File "/home/user1/cashdash/venv/lib/python3.8/site-packages/gnucashxml.py", line 324, in _book_from_tree
guid = tree.find('{http://www.gnucash.org/XML/book}id').text
AttributeError: 'NoneType' object has no attribute 'find'

any thoughts where to start looking to resovle?

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

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.