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

Dashboard charts: cannot unpack non-iterable NoneType object #11

Open
vic-t opened this issue Mar 12, 2024 · 0 comments
Open

Dashboard charts: cannot unpack non-iterable NoneType object #11

vic-t opened this issue Mar 12, 2024 · 0 comments

Comments

@vic-t
Copy link

vic-t commented Mar 12, 2024

The default dashboard shipped with ERPNext cannot be opened with the current Libracore fork.

The problem seems to be with chart type "custom" where the chart source is "account balance timeline".

Error report:

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 63, in application
    response = frappe.api.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/api.py", line 55, in handle
    return frappe.handler.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 21, in handle
    data = execute_cmd(cmd)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 56, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1036, in call
    return fn(*args, **newargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/page/dashboard/dashboard.py", line 27, in wrapper
    results = generate_and_cache_results(chart, chart_name, function, cache_key)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/page/dashboard/dashboard.py", line 32, in generate_and_cache_results
    results = function(chart_name = chart_name)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/dashboard_chart_source/account_balance_timeline/account_balance_timeline.py", line 37, in get
    gl_entries = get_gl_entries(account, get_period_ending(to_date, timegrain))
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/dashboard_chart_source/account_balance_timeline/account_balance_timeline.py", line 80, in get_gl_entries
    child_accounts = get_descendants_of('Account', account, ignore_permissions=True)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/nestedset.py", line 281, in get_descendants_of
    lft, rgt = frappe.db.get_value(doctype, name, ['lft', 'rgt'])
TypeError: cannot unpack non-iterable NoneType object
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