Closed ankush closed 2 months ago
I dont know any details, this was caught in error logs
I am facing same issue.
When I disable desk from raven settings then. Issue is not coming.
Was fixed in fix: uncreated users alignment on sidebar . Will merge it to main
Should be fixed now. Pull the latest version from main.
Still issue appear with latest pull of raven develop branch.
{
"erpnext": "15.20.3",
"frappe": "15.22.0",
"hrms": "15.17.0",
"payments": "0.0.1",
"raven": "1.5.3"
}
Form/Raven Settings/Raven Settings
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 110, 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 1718, in call
return fn(*args, **newargs)
^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "apps/raven/raven/api/raven_channel.py", line 44, in get_all_channels
extra_users = get_extra_users(dm_list)
^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/raven/raven/api/raven_channel.py", line 141, in get_extra_users
return frappe.db.get_all(
^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/database/database.py", line 761, in get_all
return frappe.get_all(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/__init__.py", line 2007, in get_all
return get_list(doctype, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/__init__.py", line 1982, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/db_query.py", line 191, in execute
result = self.build_and_run()
^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/db_query.py", line 232, in build_and_run
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 558, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "env/lib/python3.11/site-packages/pymysql/connections.py", line 822, in _read_query_result
result.read()
File "env/lib/python3.11/site-packages/pymysql/connections.py", line 1200, in read
first_packet = self.connection._read_packet()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "env/lib/python3.11/site-packages/pymysql/connections.py", line 772, in _read_packet
packet.raise_for_error()
File "env/lib/python3.11/site-packages/pymysql/protocol.py", line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File "env/lib/python3.11/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1054, "Unknown column 'tabUser.type' in 'field list'")
{
"type": "POST",
"args": {},
"headers": {},
"error_handlers": {},
"url": "/api/method/raven.api.raven_channel.get_all_channels",
"request_id": null
}
{
"exception": "pymysql.err.OperationalError: (1054, \"Unknown column 'tabUser.type' in 'field list'\")",
"exc_type": "OperationalError",
"_exc_source": "raven (app)"
}
I didn't update the version number, just pushed the change. Are you sure you're on the latest commit?
Is this running on Frappe Cloud or self hosted or local dev machine?
I didn't update the version number, just pushed the change. Are you sure you're on the latest commit?
Yes, it is latest commit.
Is this running on Frappe Cloud or self hosted or local dev machine?
self hosted for testing.
Can you check the "raven_channel.py" file - specifically the "get_extra_users" method?
It should be "Raven User" and not "User" here: https://github.com/The-Commit-Company/Raven/blob/e113f7cdf07419b030b4c88ebb4d730bd19a6836/raven/api/raven_channel.py#L142
This is the self hosted server code screenshot.
This is the self hosted server code screenshot.
Yep, code is the latest. It's not querying the "User" doctype, but the "Raven User" doctype. Not sure why you are still getting the error. If it's self-hosted, did you restart bench?
Yes. Already restarted.
Facing the same issue. I even disabled the "Show Raven on Desk". But still the same error. I have hosted my app on frappecloud, I can't update the app.
{
"erpnext": "15.21.2",
"frappe": "15.25.0",
"hrms": "15.20.2",
"india_compliance": "15.7.3",
"lms": "1.0.0",
"raven": "1.5.4"
}
Form/Raven Channel/new-raven-channel-qarwgxpttj
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 110, 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 1761, in call
return fn(*args, **newargs)
^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "apps/raven/raven/api/raven_channel.py", line 44, in get_all_channels
extra_users = get_extra_users(dm_list)
^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/raven/raven/api/raven_channel.py", line 141, in get_extra_users
return frappe.db.get_all(
^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/database/database.py", line 761, in get_all
return frappe.get_all(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/__init__.py", line 2050, in get_all
return get_list(doctype, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/__init__.py", line 2025, in get_list
return frappe.model.db_query.DatabaseQuery(doctype).execute(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/db_query.py", line 191, in execute
result = self.build_and_run()
^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/db_query.py", line 232, in build_and_run
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 558, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "env/lib/python3.11/site-packages/pymysql/connections.py", line 822, in _read_query_result
result.read()
File "env/lib/python3.11/site-packages/pymysql/connections.py", line 1200, in read
first_packet = self.connection._read_packet()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "env/lib/python3.11/site-packages/pymysql/connections.py", line 772, in _read_packet
packet.raise_for_error()
File "env/lib/python3.11/site-packages/pymysql/protocol.py", line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File "env/lib/python3.11/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1054, "Unknown column 'tabUser.type' in 'field list'")
{
"type": "POST",
"args": {},
"headers": {},
"error_handlers": {},
"url": "/api/method/raven.api.raven_channel.get_all_channels",
"request_id": "c1541a76-9c27-4341-ab02-c28c8bfdfb7f"
}
{
"exception": "pymysql.err.OperationalError: (1054, \"Unknown column 'tabUser.type' in 'field list'\")",
"exc_type": "OperationalError",
"_exc_source": "raven (app)"
}
@dsatsangi We have pushed a fix for this and then another update afterwards in v1.5.5.
If you are on a public bench, Frappe Cloud would have to update the app for you. @ankush Can we update the public bench?