Unable to view timesheet report with below error
App Versions
{
"erpnext": "14.25.0",
"frappe": "14.36.3",
"hrms": "15.0.0-dev",
"india_compliance": "14.7.0"
}
Route
query-report/Timesheet
Traceback
Syntax error in query:
Select
Name as "Employee Name"
From
'tabTimesheet'
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 66, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 54, in handle
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 45, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 83, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/__init__.py", line 1607, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/__init__.py", line 789, in wrapper_fn
retval = fn(*args, **get_newargs(fn, kwargs))
File "apps/frappe/frappe/desk/query_report.py", line 231, in run
result = generate_report_result(report, filters, user, custom_columns, is_tree, parent_field)
File "apps/frappe/frappe/__init__.py", line 789, 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 68, in get_report_result
res = report.execute_query_report(filters)
File "apps/frappe/frappe/core/doctype/report/report.py", line 117, in execute_query_report
result = [list(t) for t in frappe.db.sql(self.query, filters)]
File "apps/frappe/frappe/database/database.py", line 219, in sql
self._cursor.execute(query, values)
File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 158, in execute
result = self._query(query)
File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 325, in _query
conn.query(q)
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 549, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 779, in _read_query_result
result.read()
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 1157, in read
first_packet = self.connection._read_packet()
File "env/lib/python3.10/site-packages/pymysql/connections.py", line 729, in _read_packet
packet.raise_for_error()
File "env/lib/python3.10/site-packages/pymysql/protocol.py", line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File "env/lib/python3.10/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''tabTimesheet'' at line 4")
Request Data
{
"type": "GET",
"args": {
"report_name": "Timesheet",
"filters": "{}",
"are_default_filters": true
},
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.desk.query_report.run"
}
Response Data
{
"exception": "pymysql.err.ProgrammingError: (1064, \"You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''tabTimesheet'' at line 4\")"
}