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/utils/goal.py", line 97, in get_monthly_goal_graph_data
month_to_value_dict = get_monthly_results(
File "apps/frappe/frappe/utils/goal.py", line 37, in get_monthly_results
.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.AmbiguousFunction: function sum(unknown) is not unique
LINE 1: ...CT TO_CHAR("posting_date",'MM-YYYY') "month_year",sum('base_...
^
HINT: Could not choose a best candidate function. You might need to add explicit type casts.
{
"exception": "",
"exc_type": "AmbiguousFunction",
"_debug_messages": "[\"Error in query:\\nfunction sum(unknown) is not unique\\nLINE 1: ...CT TO_CHAR(\\\"posting_date\\\",'MM-YYYY') \\\"month_year\\\",sum('base_...\\n ^\\nHINT: Could not choose a best candidate function. You might need to add explicit type casts.\\n\"]"
}
Information about bug
HINT: Use separate LIMIT and OFFSET clauses. Possible source of error: erpnext (app)
Module
accounts
Version
ERPNext: v15.34.0 (version-15)
Frappe Framework: v15.40.0 (version-15)
Installation method
manual install
Relevant log output / Stack trace / Full Error Message.
Route
Traceback
Request Data
Response Data