Error frappe.exceptions.SessionBootFailed


I am getting below error after restoring site…

Traceback (most recent call last):
File “apps/frappe/frappe/www/”, line 27, in get_context
boot = frappe.sessions.get()
File “apps/frappe/frappe/”, line 138, in get
bootinfo = get_bootinfo()
File “apps/frappe/frappe/”, line 40, in get_bootinfo
File “apps/frappe/frappe/”, line 278, in get_user
bootinfo.user = frappe.get_user().load_user()
File “apps/frappe/frappe/utils/”, line 213, in load_user
d = frappe.db.get_value(
File “apps/frappe/frappe/database/”, line 519, in get_value
result = self.get_values(
File “apps/frappe/frappe/database/”, line 623, in get_values
out = self._get_values_from_table(
File “apps/frappe/frappe/database/”, line 896, in _get_values_from_table
return, debug=debug, update=update, run=run, pluck=pluck)
File “apps/frappe/frappe/query_builder/”, line 87, in execute_query
result = frappe.db.sql(query, params, *args, **kwargs) # nosemgrep
File “apps/frappe/frappe/database/”, line 234, in sql
self._cursor.execute(query, values)
File “env/lib/python3.11/site-packages/pymysql/”, line 153, in execute
result = self._query(query)
File “env/lib/python3.11/site-packages/pymysql/”, line 322, in _query
File “env/lib/python3.11/site-packages/pymysql/”, line 558, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “env/lib/python3.11/site-packages/pymysql/”, line 822, in _read_query_result
File “env/lib/python3.11/site-packages/pymysql/”, line 1200, in read
first_packet = self.connection._read_packet()
File “env/lib/python3.11/site-packages/pymysql/”, line 772, in _read_packet
File “env/lib/python3.11/site-packages/pymysql/”, line 221, in raise_for_error
File “env/lib/python3.11/site-packages/pymysql/”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1054, “Unknown column ‘default_workspace’ in ‘field list’”)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “apps/frappe/frappe/website/”, line 20, in get_response
response = renderer_instance.render()
File “apps/frappe/frappe/website/page_renderers/”, line 84, in render
html = self.get_html()
File “apps/frappe/frappe/website/”, line 523, in cache_html_decorator
html = func(*args, **kwargs)
File “apps/frappe/frappe/website/page_renderers/”, line 95, in get_html
File “apps/frappe/frappe/website/page_renderers/”, line 163, in update_context
data = self.run_pymodule_method(“get_context”)
File “apps/frappe/frappe/website/page_renderers/”, line 223, in run_pymodule_method
return method(self.context)
File “apps/frappe/frappe/www/”, line 29, in get_context
raise frappe.SessionBootFailed from e

Clear your browser cookies and then give it another try

I am getting the same error after restoring a site to a new bench site. Can anyone help

can anyone solved this?

i found this and solved on my case

bench --site {site} migrate
1 Like

Solved it also for me on a deployment in kubernetes. If doc types or the database schema changes, then you need to do a bench migrate.

Trying to summarize: How are updates handled with docker images? When a new version is deployed that requires a bench migrate, this should be performed automatically. This is important especially for a kubernetes set-up - if a pod is being moved to another worker, it would pull the latest image and needs to trigger a migration. In the Helm chart this has been fixed lately fix: migrate job by revant · Pull Request #154 · frappe/helm · GitHub by @revant_one