Issue
I am trying to setup Sentry Python project and am receiving this error when trying to initialize Sentry.
Applies To
- All Sentry organizations
- Python users
Symptoms
- Cannot run my project successfully with Sentry.
Resolution
This is a Python compatibility error and not necessarily being triggered by Sentry. This error can be resolved by updating your code base for Python3 compatibility, checking for and removing and circular imports and checking that you are using the correct Python version.
In the case that you are using jinja2, make sure that you are using the most recent version of jinja2 as well which will resolve this issue as this is where this import is occurring. If using the most recent version of jinja is not possible, you will need to use Python 3.9 or earlier.