[ERROR : ] Internal Server Error ( pymysql.err.OperationalError: (1054, "Unknown column 'parent' in 'field list'")

I have the following error. On the login screen, it shows an Error

Traceback (most recent call last):
File “apps/frappe/frappe/app.py”, line 55, in application
init_request(request)
File “apps/frappe/frappe/app.py”, line 130, in init_request
frappe.local.http_request = frappe.auth.HTTPRequest()
File “apps/frappe/frappe/auth.py”, line 37, in init
self.set_session()
File “apps/frappe/frappe/auth.py”, line 74, in set_session
frappe.local.login_manager = LoginManager()
File “apps/frappe/frappe/auth.py”, line 130, in init
self.make_session(resume=True)
File “apps/frappe/frappe/auth.py”, line 215, in make_session
frappe.local.session_obj = Session(
File “apps/frappe/frappe/sessions.py”, line 215, in init
self.resume()
File “apps/frappe/frappe/sessions.py”, line 282, in resume
data = self.get_session_record()
File “apps/frappe/frappe/sessions.py”, line 300, in get_session_record
r = self.get_session_data()
File “apps/frappe/frappe/sessions.py”, line 316, in get_session_data
data = self.get_session_data_from_db()
File “apps/frappe/frappe/sessions.py”, line 354, in get_session_data_from_db
self._delete_session()
File “apps/frappe/frappe/sessions.py”, line 360, in _delete_session
delete_session(self.sid, reason=“Session Expired”)
File “apps/frappe/frappe/sessions.py”, line 102, in delete_session
logout_feed(user, reason)
File “apps/frappe/frappe/core/doctype/activity_log/feed.py”, line 67, in logout_feed
add_authentication_log(subject, user, operation=“Logout”)
File “apps/frappe/frappe/core/doctype/activity_log/activity_log.py”, line 39, in add_authentication_log
frappe.get_doc(
File “apps/frappe/frappe/model/document.py”, line 273, in insert
self.db_insert()
File “apps/frappe/frappe/model/base_document.py”, line 400, in db_insert
frappe.db.sql(
File “apps/frappe/frappe/database/database.py”, line 174, in sql
self._cursor.execute(query, values)
File “env/lib/python3.9/site-packages/pymysql/cursors.py”, line 148, in execute
result = self._query(query)
File “env/lib/python3.9/site-packages/pymysql/cursors.py”, line 310, in _query
conn.query(q)
File “env/lib/python3.9/site-packages/pymysql/connections.py”, line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “env/lib/python3.9/site-packages/pymysql/connections.py”, line 775, in _read_query_result
result.read()
File “env/lib/python3.9/site-packages/pymysql/connections.py”, line 1156, in read
first_packet = self.connection._read_packet()
File “env/lib/python3.9/site-packages/pymysql/connections.py”, line 725, in _read_packet
packet.raise_for_error()
File “env/lib/python3.9/site-packages/pymysql/protocol.py”, line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File “env/lib/python3.9/site-packages/pymysql/err.py”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1054, “Unknown column ‘parent’ in ‘field list’”)

Hi,

Is this happening on your first use of Frappe or was it working well and the error happened after some other event?

@smino It was working well but I tried some customization, then it is showing this error.

Try bench migrate or bench update and see if they complete.

1 Like

did you slove this error?
tell me Plz

@Ala_Alsalam refer @smino reply

does not work with me, When I do migrate I have an error
:
yarn install v1.22.19
[1/4] Resolving packages…
success Already up-to-date.
Done in 0.13s.
Patching sites…
Migrating rt.partner-cons.com
Executing execute:frappe.reload_doc(‘social’, ‘doctype’, ‘energy_point_log’) in rt.partner-cons.com (_ee769cb12a91c81f)

Traceback (most recent call last):
File “/usr/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.10/runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 110, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 20, in main
click.Group(commands=commands)(prog_name=“bench”)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/decorators.py”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 31, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 433, in migrate
migrate(context.verbose, skip_failing=skip_failing, skip_search_index=skip_search_index)
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 73, in migrate
frappe.modules.patch_handler.run_all(skip_failing)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 47, in run_all
run_patch(patch)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 36, in run_patch
if not run_single(patchmodule=patch):
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 81, in run_single
return execute_patch(patchmodule, method, methodargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 106, in execute_patch
update_patch_log(patchmodule)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py”, line 125, in update_patch_log
frappe.get_doc({“doctype”: “Patch Log”, “patch”: patchmodule}).insert(ignore_permissions=True)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 273, in insert
self.db_insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 400, in db_insert
frappe.db.sql(
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 174, in sql
self._cursor.execute(query, values)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pymysql/cursors.py”, line 148, in execute
result = self._query(query)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pymysql/cursors.py”, line 310, in _query
conn.query(q)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py”, line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py”, line 775, in _read_query_result
result.read()
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py”, line 1156, in read
first_packet = self.connection._read_packet()
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py”, line 725, in _read_packet
packet.raise_for_error()
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pymysql/protocol.py”, line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File “/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pymysql/err.py”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1054, “Unknown column ‘parent’ in ‘field list’”)

Restored db backup from ERPNext v12 to v14 and got this after after restoring the db backup its not being resolved.

Please help.

Traceback (most recent call last):
File “/usr/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.10/runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “/home/usr/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 109, in
main()
File “/home/usr/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=“bench”)
File “/home/usr/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/usr/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/usr/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/usr/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/usr/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/usr/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/usr/frappe-bench/env/lib/python3.10/site-packages/click/decorators.py”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/usr/frappe-bench/apps/frappe/frappe/commands/init.py”, line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/usr/frappe-bench/apps/frappe/frappe/commands/site.py”, line 552, in migrate
SiteMigration(
File “/home/usr/frappe-bench/apps/frappe/frappe/migrate.py”, line 172, in run
self.setUp()
File “/home/usr/frappe-bench/apps/frappe/frappe/migrate.py”, line 74, in setUp
clear_global_cache()
File “/home/usr/frappe-bench/apps/frappe/frappe/cache_manager.py”, line 102, in clear_global_cache
clear_website_cache()
File “/home/usr/frappe-bench/apps/frappe/frappe/website/utils.py”, line 387, in clear_website_cache
clear_cache(path)
File “/home/usr/frappe-bench/apps/frappe/frappe/website/utils.py”, line 370, in clear_cache
frappe.clear_cache(“Guest”)
File “/home/usr/frappe-bench/apps/frappe/frappe/init.py”, line 872, in clear_cache
frappe.cache_manager.clear_user_cache(user)
File “/home/usr/frappe-bench/apps/frappe/frappe/cache_manager.py”, line 78, in clear_user_cache
clear_notifications(user)
File “/home/usr/frappe-bench/apps/frappe/frappe/desk/notifications.py”, line 143, in clear_notifications
config = get_notification_config()
File “/home/usr/frappe-bench/apps/frappe/frappe/desk/notifications.py”, line 236, in get_notification_config
return frappe.cache().hget(“notification_config”, user, _get)
File “/home/usr/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 201, in hget
value = generator()
File “/home/usr/frappe-bench/apps/frappe/frappe/desk/notifications.py”, line 214, in _get
subscribed_documents = get_subscribed_documents()
File “/home/usr/frappe-bench/apps/frappe/frappe/desk/doctype/notification_settings/notification_settings.py”, line 69, in get_subscribed_documents
doc = frappe.get_doc(“Notification Settings”, frappe.session.user)
File “/home/usr/frappe-bench/apps/frappe/frappe/init.py”, line 1180, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File “/home/usr/frappe-bench/apps/frappe/frappe/model/document.py”, line 74, in get_doc
return controller(*args, **kwargs)
File “/home/usr/frappe-bench/apps/frappe/frappe/model/document.py”, line 106, in init
self.load_from_db()
File “/home/usr/frappe-bench/apps/frappe/frappe/model/document.py”, line 158, in load_from_db
if hasattr(self, “doctype”) and not hasattr(self, “module”) and is_virtual_doctype(df.options):
File “/home/usr/frappe-bench/apps/frappe/frappe/utils/caching.py”, line 119, in site_cache_wrapper
_SITE_CACHE[func_key][frappe.local.site][func_call_key] = func(*args, **kwargs)
File “/home/usr/frappe-bench/apps/frappe/frappe/model/utils/init.py”, line 133, in is_virtual_doctype
return frappe.db.get_value(“DocType”, doctype, “is_virtual”)
File “/home/usr/frappe-bench/apps/frappe/frappe/database/database.py”, line 473, in get_value
result = self.get_values(
File “/home/usr/frappe-bench/apps/frappe/frappe/database/database.py”, line 570, in get_values
out = self._get_values_from_table(
File “/home/usr/frappe-bench/apps/frappe/frappe/database/database.py”, line 800, in _get_values_from_table
return self.sql(query, as_dict=as_dict, debug=debug, update=update, run=run, pluck=pluck)
File “/home/usr/frappe-bench/apps/frappe/frappe/database/database.py”, line 207, in sql
self._cursor.execute(query, values)
File “/home/usr/frappe-bench/env/lib/python3.10/site-packages/pymysql/cursors.py”, line 148, in execute
result = self._query(query)
File “/home/usr/frappe-bench/env/lib/python3.10/site-packages/pymysql/cursors.py”, line 310, in _query
conn.query(q)
File “/home/usr/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py”, line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/home/usr/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py”, line 775, in _read_query_result
result.read()
File “/home/usr/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py”, line 1156, in read
first_packet = self.connection._read_packet()
File “/home/usr/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py”, line 725, in _read_packet
packet.raise_for_error()
File “/home/usr/frappe-bench/env/lib/python3.10/site-packages/pymysql/protocol.py”, line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File “/home/usr/frappe-bench/env/lib/python3.10/site-packages/pymysql/err.py”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1054, “Unknown column ‘is_virtual’ in ‘field list’”)

have you got any solutions ?

Initially, I installed Ubuntu Desktop and restored the DB which caused this issue.
Then restored the DB on Ubuntu Server Live which resolved the issue and my DB was restored successfully.

I ran restore command and ‘bench update’ after the restore was completed.

did you install hrms module?

In my case, I have install erpnext v14 in my Development Setup {Ubuntu Docker} after that I run the restore command & see the restore successfully completed.

then I have run bench start command & I got the same error which you have already mention in your post.

i have the same problem any solutions

get export of all data like sales purchase stock and payments and delete all transactions of company and export data again

I am also getting the same,
how you resolved it.
I have tried “branch update” as said in this discussion.
could you please reply?

bench --site frontend migrate
Migrating frontend

Traceback (most recent call last):
File “”, line 198, in _run_module_as_main
File “”, line 88, in _run_code
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 114, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 20, in main
click.Group(commands=commands)(prog_name=“bench”)
File “/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py”, line 1161, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py”, line 1082, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py”, line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py”, line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py”, line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py”, line 788, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/decorators.py”, line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/init.py”, line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 695, in migrate
).run(site=site)
^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 183, in run
self.setUp()
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 81, in setUp
clear_global_cache()
File “/home/frappe/frappe-bench/apps/frappe/frappe/cache_manager.py”, line 108, in clear_global_cache
clear_website_cache()
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/utils.py”, line 408, in clear_website_cache
clear_cache(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/utils.py”, line 391, in clear_cache
frappe.clear_cache(“Guest”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 971, in clear_cache
frappe.cache_manager.clear_user_cache(user)
File “/home/frappe/frappe-bench/apps/frappe/frappe/cache_manager.py”, line 85, in clear_user_cache
clear_notifications(user)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/notifications.py”, line 143, in clear_notifications
config = get_notification_config()
^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/notifications.py”, line 233, in get_notification_config
return frappe.cache.hget(“notification_config”, user, _get)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 237, in hget
value = generator()
^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/notifications.py”, line 211, in _get
subscribed_documents = get_subscribed_documents()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/typing_validations.py”, line 31, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/doctype/notification_settings/notification_settings.py”, line 95, in get_subscribed_documents
doc = frappe.get_doc(“Notification Settings”, frappe.session.user)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1291, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 85, in get_doc
return controller(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 126, in init
self.load_from_db()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 151, in load_from_db
if not getattr(self, “_metaclass”, False) and self.meta.issingle:
^^^^^^^^^
File “/usr/local/lib/python3.11/functools.py”, line 1001, in get
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 143, in meta
return frappe.get_meta(self.doctype)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1318, in get_meta
return frappe.model.meta.get_meta(doctype, cached=cached)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py”, line 68, in get_meta
meta = Meta(doctype)
^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py”, line 122, in init
super().init(“DocType”, doctype)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 126, in init
self.load_from_db()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py”, line 128, in load_from_db
super().load_from_db()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 188, in load_from_db
frappe.db.get_values(
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 619, in get_values
out = self._get_values_from_table(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 892, in _get_values_from_table
return query.run(as_dict=as_dict, debug=debug, update=update, run=run, pluck=pluck)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/query_builder/utils.py”, line 87, in execute_query
result = frappe.db.sql(query, params, *args, **kwargs) # nosemgrep
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 230, in sql
self._cursor.execute(query, values)
File “/home/frappe/frappe-bench/env/lib/python3.11/site-packages/pymysql/cursors.py”, line 153, in execute
result = self._query(query)
^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/env/lib/python3.11/site-packages/pymysql/cursors.py”, line 322, in _query
conn.query(q)
File “/home/frappe/frappe-bench/env/lib/python3.11/site-packages/pymysql/connections.py”, line 563, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/env/lib/python3.11/site-packages/pymysql/connections.py”, line 825, in _read_query_result
result.read()
File “/home/frappe/frappe-bench/env/lib/python3.11/site-packages/pymysql/connections.py”, line 1199, in read
first_packet = self.connection._read_packet()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/frappe/frappe-bench/env/lib/python3.11/site-packages/pymysql/connections.py”, line 775, in _read_packet
packet.raise_for_error()
File “/home/frappe/frappe-bench/env/lib/python3.11/site-packages/pymysql/protocol.py”, line 219, in raise_for_error
err.raise_mysql_exception(self._data)
File “/home/frappe/frappe-bench/env/lib/python3.11/site-packages/pymysql/err.py”, line 150, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1054, “Unknown column ‘parent’ in ‘WHERE’”)