It is the report generation, when it run from a development server it is working fine but from production server it is not working. I ahve attached the error below if anyone could help me with this

Traceback (most recent call last):
File “/home/frappe/erp/apps/frappe/frappe/”, line 55, in application
response = frappe.handler.handle()
File “/home/frappe/erp/apps/frappe/frappe/”, line 25, in handle
File “/home/frappe/erp/apps/frappe/frappe/”, line 42, in execute_cmd
ret =, **frappe.form_dict)
File “/home/frappe/erp/apps/frappe/frappe/”, line 880, in call
return fn(*args, **newargs)
File “/home/frappe/erp/apps/frappe/frappe/desk/”, line 105, in run
result = add_total_row(result, columns)
File “/home/frappe/erp/apps/frappe/frappe/desk/”, line 134, in add_total_row
if fieldtype in [“Currency”, “Int”, “Float”, “Percent”] and flt(row[i]):
KeyError: 2

Disable add total row and recheck report.

Thank you so much it works but it is not showing the total at the end of the report.

Check the field type of column, if it’s float/int but corresponding value is text or alphanumeric then system will throw exception. Better to data as field type in such case.

Thank you so much let me try.

Uncaught TypeError: value.match is not a function
at Link (desk.min.js:21)
at Object.frappe.format (desk.min.js:42)
at formatter (report.min.js:85)
at appendCellHtml (report.min.js:440)
at appendRowHtml (report.min.js:434)
at renderRows (report.min.js:500)
at render (report.min.js:511)
at resizeCanvas (report.min.js:469)
at SlickGrid.finishInitialization [as init] (report.min.js:293)
at Class.render (report.min.js:82)

Still i am getting this error. Anyone could help me.

Post your SQL query if this report is a Query Report.

As I mentioned earlier, check field type of column.
if fieldtype in [“Currency”, “Int”, “Float”, “Percent”] and flt(row[i])

thank you sir