Try ERPNext Buy Support Partners Foundation

TypeError: 'dict_keys' object does not support indexing

after upgrading to python3

opening “Customer Ledger Summary” getting error

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 61, in application
    response = 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/__init__.py", line 511, in wrapper_fn
    retval = fn(*args, **get_newargs(fn, kwargs))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/query_report.py", line 201, in run
    result = generate_report_result(report, filters, user)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/query_report.py", line 76, in generate_report_result
    res = frappe.get_attr(method_name)(frappe._dict(filters))
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py", line 308, in execute
    return PartyLedgerSummaryReport(filters).run(args)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py", line 29, in run
    self.get_party_adjustment_amounts()
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py", line 289, in get_party_adjustment_amounts
    party = parties.keys()[0]
TypeError: 'dict_keys' object does not support indexing

I see this error is still present up till today on V11

Traceback (most recent call last):
  File "/home/jenan/frappe-bench/apps/frappe/frappe/app.py", line 61, in application
    response = frappe.handler.handle()
  File "/home/jenan/frappe-bench/apps/frappe/frappe/handler.py", line 21, in handle
    data = execute_cmd(cmd)
  File "/home/jenan/frappe-bench/apps/frappe/frappe/handler.py", line 56, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "/home/jenan/frappe-bench/apps/frappe/frappe/__init__.py", line 1036, in call
    return fn(*args, **newargs)
  File "/home/jenan/frappe-bench/apps/frappe/frappe/__init__.py", line 511, in wrapper_fn
    retval = fn(*args, **get_newargs(fn, kwargs))
  File "/home/jenan/frappe-bench/apps/frappe/frappe/desk/query_report.py", line 201, in run
    result = generate_report_result(report, filters, user)
  File "/home/jenan/frappe-bench/apps/frappe/frappe/desk/query_report.py", line 76, in generate_report_result
    res = frappe.get_attr(method_name)(frappe._dict(filters))
  File "/home/jenan/frappe-bench/apps/erpnext/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py", line 308, in execute
    return PartyLedgerSummaryReport(filters).run(args)
  File "/home/jenan/frappe-bench/apps/erpnext/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py", line 29, in run
    self.get_party_adjustment_amounts()
  File "/home/jenan/frappe-bench/apps/erpnext/erpnext/accounts/report/customer_ledger_summary/customer_ledger_summary.py", line 289, in get_party_adjustment_amounts
    party = parties.keys()[0]
TypeError: 'dict_keys' object does not support indexing

@iRaySpace Please look into this and update the report python when ever you get time.
Then please upstream it.

Thank You.

PR raised to fix this error. Waiting for merge by Frappe.