App Versions
{
"frappe": "15.39.2",
"frappe_whatsapp": "v1.0.7",
"raven": "1.6.13",
"rawscholar": "0.0.1",
"whatsapp_chat": "0.0.1",
"wiki": "2.0.0"
}
Route
Form/WhatsApp Notification/new-whatsapp-notification-bhsxtougun
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 1768, in call
return fn(*args, **newargs)
^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "apps/whatsapp_chat/whatsapp_chat/api/message.py", line 14, in get_all
return frappe.db.sql("""
^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/database/database.py", line 234, in sql
self._cursor.execute(query, values)
File "env/lib/python3.11/site-packages/pymysql/cursors.py", line 153, in execute
result = self._query(query)
^^^^^^^^^^^^^^^^^^
File "env/lib/python3.11/site-packages/pymysql/cursors.py", line 322, in _query
conn.query(q)
File "env/lib/python3.11/site-packages/pymysql/connections.py", line 563, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "env/lib/python3.11/site-packages/pymysql/connections.py", line 825, in _read_query_result
result.read()
File "env/lib/python3.11/site-packages/pymysql/connections.py", line 1199, in read
first_packet = self.connection._read_packet()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "env/lib/python3.11/site-packages/pymysql/connections.py", line 775, in _read_packet
packet.raise_for_error()
File "env/lib/python3.11/site-packages/pymysql/protocol.py", line 219, in raise_for_error
err.raise_mysql_exception(self._data)
File "env/lib/python3.11/site-packages/pymysql/err.py", line 150, 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 \'"tabWhatsApp Message" where "to" = \'+917558800907\' or "from" = \'+917558800907...\' at line 11')
Request Data
{
"type": "POST",
"args": {
"room": "vuvchtm29b",
"user_no": "+917558800907"
},
"headers": {},
"error_handlers": {},
"url": "/api/method/whatsapp_chat.api.message.get_all",
"request_id": "5df0591c-99b8-4be6-b952-fc4af90aac76"
}
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 \\'\"tabWhatsApp Message\" where \"to\" = \\'+917558800907\\' or \"from\" = \\'+917558800907...\\' at line 11')",
"exc_type": "ProgrammingError",
"_exc_source": "whatsapp_chat (app)",
"_debug_messages": "[\"Syntax error in query:\\nSELECT creation,\\n case\\n when \\\"to\\\" <> '' then \\\"to\\\"\\n else\\n 'Administrator'\\n end as sender_user_no,\\n case\\n when content_type = 'text' then message\\n else attach\\n end as content\\n from \\\"tabWhatsApp Message\\\" where \\\"to\\\" = %(user_no)s or \\\"from\\\" = %(user_no)s\\n order by creation asc /* FRAPPE_TRACE_ID: 5df0591c-99b8-4be6-b952-fc4af90aac76 */ {'user_no': '+917558800907'}\"]"
}
i’m using whatspp chat app and encountered this error, any one know how to solve this error