Frappe Cloud Support Partners Foundation Frappe School

AttributeError: 'NoneType' object has no attribute 'customer_name'

When i try to generate Item Wise Sales History report i get the error.

Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/prepared_report/", line 47, in run_background
File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/", line 65, in generate_report_result
res = report.execute_script_report(filters)
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/report/", line 120, in execute_script_report
res = self.execute_module(filters)
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/report/", line 137, in execute_module
return frappe.get_attr(method_name)(frappe._dict(filters))
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/selling/report/item_wise_sales_history/", line 16, in execute
data = get_data(filters)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/selling/report/item_wise_sales_history/", line 164, in get_data
"customer_name": customer_record.customer_name,
AttributeError: 'NoneType' object has no attribute 'customer_name'

I am getting AttributeError: 'NoneType' object has no attribute 'item_name' error on Item Wise Sales History Report

Was anyone able to solve this issue?

Hi! Has anyone been able to solve the issue? I’m facing this on particular date ranges of Item-wise sales register. Thanks for the help.