Error after migrate

Traceback (most recent call last):
File “apps/frappe/frappe/www/”, line 29, in get_context
boot = frappe.sessions.get()
File “apps/frappe/frappe/”, line 167, in get
File “apps/frappe/frappe/”, line 1705, in get_attr
return getattr(get_module(modulename), methodname)
File “apps/frappe/frappe/”, line 1441, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python3.11/importlib/”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1206, in _gcd_import
File “”, line 1178, in _find_and_load
File “”, line 1149, in _find_and_load_unlocked
File “”, line 690, in _load_unlocked
File “”, line 940, in exec_module
File “”, line 241, in _call_with_frames_removed
File “apps/frappe/frappe/utils/”, line 4, in
from sentry_sdk import capture_message as sentry_capture_message
ModuleNotFoundError: No module named ‘sentry_sdk’

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

Traceback (most recent call last):
File “apps/frappe/frappe/website/”, line 18, 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 524, 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 225, in run_pymodule_method
return method(self.context)
File “apps/frappe/frappe/www/”, line 31, in get_context
raise frappe.SessionBootFailed from e

Hi @riddhi1
Please Try This Command I hope this helps you

bench --site [site-name] uninstall-app sentry_sdk
bench migrate

Thank You!

No module named ‘sentry_sdk’ after run this command

Please Try It Command

bench remove-app sentry_sdk --force
bench migrate

This can happen even if you have directly removed the module.
Thank You!

Hi @riddhi1,

Perhaps, you have to install the packages according to Python.

Please check the documentation.

Thank You!