Error in export custom report to Excel

Hello, when I try to export a custom report in Excel format I get the following error:

Traceback (most recent call last):
  File "/home/erp/erpnext/apps/frappe/frappe/", line 62, in application
    response = frappe.handler.handle()
  File "/home/erp/erpnext/apps/frappe/frappe/", line 22, in handle
    data = execute_cmd(cmd)
  File "/home/erp/erpnext/apps/frappe/frappe/", line 53, in execute_cmd
    return, **frappe.form_dict)
  File "/home/erp/erpnext/apps/frappe/frappe/", line 939, in call
    return fn(*args, **newargs)
  File "/home/erp/erpnext/apps/frappe/frappe/desk/", line 161, in export_query
AttributeError: 'list' object has no attribute 'get'

If I select CSV the report exports without errors.

Any ideas?


version? are you using new datatable released in develop branch?

ERPNext: v10.1.14 (master)
Frappe Framework: v10.1.7 (master)

Works fine inv10.1.13

@saurabh6790 can you check if it is on hotfix or master?

I figured out that the problem isn’t present in all the custom reports but one.
The issue was because the report has an empty last row, in CSV it seems that isn’t an issue but in Excel yes.

I have removed the empty row and now works.

Sorry for bother and thanks for the quick response.

1 Like