### App Versions
{
“erpnext”: “14.71.0”,
“frappe”: “14.72.0”,
“helpdesk”: “0.10.0”,
“hrms”: “14.29.3”,
“insights”: “2.2.4”,
“payment_due_date_fix”: “0.0.1”,
“payments”: “0.0.1”,
“timeclock”: “0.0.1”,
“twilio_integration”: “0.0.1”,
“value_based_blanket_order”: “0.0.1”,
“wiki”: “2.0.0”
}
### Route
query-report/Sales Analytics
### Traceback
Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 95, in application
response = frappe.api.handle()
File “apps/frappe/frappe/api.py”, line 55, in handle
return frappe.handler.handle()
File “apps/frappe/frappe/handler.py”, line 48, in handle
data = execute_cmd(cmd)
File “apps/frappe/frappe/handler.py”, line 86, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “apps/frappe/frappe/init.py”, line 1611, in call
return fn(*args, **newargs)
File “apps/frappe/frappe/init.py”, line 807, in wrapper_fn
retval = fn(*args, **get_newargs(fn, kwargs))
File “apps/frappe/frappe/desk/query_report.py”, line 238, in run
result = generate_report_result(report, filters, user, custom_columns, is_tree, parent_field)
File “apps/frappe/frappe/init.py”, line 807, in wrapper_fn
retval = fn(*args, **get_newargs(fn, kwargs))
File “apps/frappe/frappe/desk/query_report.py”, line 90, in generate_report_result
res = get_report_result(report, filters) or
File “apps/frappe/frappe/desk/query_report.py”, line 71, in get_report_result
res = report.execute_script_report(filters)
File “apps/frappe/frappe/core/doctype/report/report.py”, line 128, in execute_script_report
res = self.execute_module(filters)
File “apps/frappe/frappe/core/doctype/report/report.py”, line 145, in execute_module
return frappe.get_attr(method_name)(frappe._dict(filters))
File “apps/erpnext/erpnext/selling/report/sales_analytics/sales_analytics.py”, line 13, in execute
return Analytics(filters).run()
File “apps/erpnext/erpnext/selling/report/sales_analytics/sales_analytics.py”, line 42, in run
self.get_data()
File “apps/erpnext/erpnext/selling/report/sales_analytics/sales_analytics.py”, line 108, in get_data
self.get_sales_transactions_based_on_item_group()
File “apps/erpnext/erpnext/selling/report/sales_analytics/sales_analytics.py”, line 229, in get_sales_transactions_based_on_item_group
self.get_groups()
File “apps/erpnext/erpnext/selling/report/sales_analytics/sales_analytics.py”, line 373, in get_groups
self.depth_map.setdefault(d.name, self.depth_map.get(d.parent) + 1)
TypeError: unsupported operand type(s) for +: ‘NoneType’ and ‘int’
### Request Data
{
“type”: “GET”,
“args”: {
“report_name”: “Sales Analytics”,
“filters”: “{"tree_type":"Item Group","doc_type":"Sales Invoice","value_quantity":"Value","from_date":"2024-01-01","to_date":"2024-12-31","company":"Florence Filter","range":"Monthly"}”,
“ignore_prepared_report”: false,
“are_default_filters”: false
},
“headers”: {},
“error_handlers”: {},
“url”: “/api/method/frappe.desk.query_report.run”
}
### Response Data
{
“exception”: “TypeError: unsupported operand type(s) for +: ‘NoneType’ and ‘int’”
}