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/notifications.py", line 299, in get_open_count
out["timeline_data"] = module.get_timeline_data(doctype, name)
File "apps/erpnext/erpnext/stock/doctype/item/item.py", line 1098, in get_timeline_data
.run()
File "apps/frappe/frappe/query_builder/utils.py", line 87, in execute_query
result = frappe.db.sql(query, params, *args, **kwargs) # nosemgrep
File "apps/frappe/frappe/database/postgres/database.py", line 218, in sql
return super().sql(modify_query(query), modify_values(values), *args, **kwargs)
File "apps/frappe/frappe/database/database.py", line 227, in sql
self._cursor.execute(query, values)
psycopg2.errors.SyntaxError: syntax error at or near "("
LINE 1: ...item_code"='Test1' AND "posting_date">CURRENT_DATE()-INTERVA...
^
{
"exception": "",
"exc_type": "SyntaxError",
"_exc_source": "erpnext (app)",
"_debug_messages": "[\"Syntax error in query:\\nSELECT EXTRACT(epoch FROM \\\"posting_date\\\"),COUNT(*) FROM \\\"tabStock Ledger Entry\\\" WHERE \\\"item_code\\\"=%(param1)s AND \\\"posting_date\\\">CURRENT_DATE()-INTERVAL '1 YEAR' GROUP BY \\\"posting_date\\\" {'param1': 'Test1'}\"]"
}
Information about bug
If you click on dashboard in Item getting server error
Module
stock
Version
"erpnext": "15.34.0", "frappe": "15.41.0",
Installation method
manual install
Relevant log output / Stack trace / Full Error Message.
Route
Traceback
Request Data
Response Data