I get this error when I click on attendance in HR
AttributeError: ‘NoneType’ object has no attribute ‘nodes_’
Possible source of error: hrms (app)
anyone encounter such error before…?
Any updates on this issue? I haven’t been able to find any clues to get started.
here is the entire error
App Versions
{
"erpnext": "15.35.1",
"frappe": "15.41.0",
"helpdesk": "0.10.0",
"hrms": "16.0.0-dev",
"raven": "1.7.0"
}
Route
Workspaces/Shift & Attendance
Traceback
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 114, in application
response = frappe.api.handle(request)
File "apps/frappe/frappe/api/__init__.py", line 49, in handle
data = endpoint(**arguments)
File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 49, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/__init__.py", line 1775, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
File "apps/frappe/frappe/__init__.py", line 928, in wrapper_fn
retval = fn(*args, **get_newargs(fn, kwargs))
File "apps/frappe/frappe/desk/query_report.py", line 223, in run
result = generate_report_result(report, filters, user, custom_columns, is_tree, parent_field)
File "apps/frappe/frappe/__init__.py", line 928, in wrapper_fn
retval = fn(*args, **get_newargs(fn, kwargs))
File "apps/frappe/frappe/desk/query_report.py", line 84, in generate_report_result
res = get_report_result(report, filters) or []
File "apps/frappe/frappe/desk/query_report.py", line 65, in get_report_result
res = report.execute_script_report(filters)
File "apps/frappe/frappe/core/doctype/report/report.py", line 163, in execute_script_report
res = self.execute_module(filters)
File "apps/frappe/frappe/core/doctype/report/report.py", line 180, in execute_module
return frappe.get_attr(method_name)(frappe._dict(filters))
File "apps/hrms/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py", line 40, in execute
attendance_map = get_attendance_map(filters)
File "apps/hrms/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py", line 226, in get_attendance_map
attendance_list = get_attendance_records(filters)
File "apps/hrms/hrms/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py", line 265, in get_attendance_records
.where(
File "env/lib/python3.10/site-packages/pypika/utils.py", line 50, in _copy
result = func(self_copy, *args, **kwargs)
File "env/lib/python3.10/site-packages/pypika/queries.py", line 930, in where
if not self._validate_table(criterion):
File "env/lib/python3.10/site-packages/pypika/queries.py", line 1155, in _validate_table
for field in term.fields_():
File "env/lib/python3.10/site-packages/pypika/terms.py", line 57, in fields_
return set(self.find_(Field))
File "env/lib/python3.10/site-packages/pypika/terms.py", line 37, in find_
return [node for node in self.nodes_() if isinstance(node, type)]
File "env/lib/python3.10/site-packages/pypika/terms.py", line 37, in <listcomp>
return [node for node in self.nodes_() if isinstance(node, type)]
File "env/lib/python3.10/site-packages/pypika/terms.py", line 743, in nodes_
yield from self.left.nodes_()
File "env/lib/python3.10/site-packages/pypika/terms.py", line 743, in nodes_
yield from self.left.nodes_()
File "env/lib/python3.10/site-packages/pypika/terms.py", line 742, in nodes_
yield from self.right.nodes_()
File "env/lib/python3.10/site-packages/pypika/terms.py", line 795, in nodes_
yield from self.container.nodes_()
AttributeError: 'NoneType' object has no attribute 'nodes_'
Request Data
{
"type": "POST",
"args": {
"report_name": "Monthly Attendance Sheet",
"filters": "{\"summarized_view\":0,\"month\":9,\"year\":2024}",
"ignore_prepared_report": 1
},
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.desk.query_report.run",
"request_id": null
}
Response Data
{
"exception": "AttributeError: 'NoneType' object has no attribute 'nodes_'",
"exc_type": "AttributeError",
"_exc_source": "hrms (app)"
}
For example, if Frappe is installed in version 15, then ERPNext and HRMS must also be in version 15. In your case, Frappe/ERPNext is installed in version 15, but HRMS is installed on the develop branch, maybe causing this issue.