Title: ImportError in starlette integration when jinja2 isn't installed (starlette 1.0.0) · Issue #5782 · getsentry/sentry-python · GitHub
Open Graph Title: ImportError in starlette integration when jinja2 isn't installed (starlette 1.0.0) · Issue #5782 · getsentry/sentry-python
X Title: ImportError in starlette integration when jinja2 isn't installed (starlette 1.0.0) · Issue #5782 · getsentry/sentry-python
Description: How do you use Sentry? Self-hosted/on-premise Version 2.55.0 Steps to Reproduce After upgrading to starlette 1.0.0, we've started getting ImportErrors from sentry init. pip freeze is gigantic but the relevant parts are: Python 3.10.12 se...
Open Graph Description: How do you use Sentry? Self-hosted/on-premise Version 2.55.0 Steps to Reproduce After upgrading to starlette 1.0.0, we've started getting ImportErrors from sentry init. pip freeze is gigantic but t...
X Description: How do you use Sentry? Self-hosted/on-premise Version 2.55.0 Steps to Reproduce After upgrading to starlette 1.0.0, we've started getting ImportErrors from sentry init. pip freeze is gigantic b...
Opengraph URL: https://github.com/getsentry/sentry-python/issues/5782
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ImportError in starlette integration when jinja2 isn't installed (starlette 1.0.0)","articleBody":"### How do you use Sentry?\n\nSelf-hosted/on-premise\n\n### Version\n\n2.55.0\n\n### Steps to Reproduce\n\nAfter upgrading to starlette 1.0.0, we've started getting ImportErrors from sentry init.\n\npip freeze is gigantic but the relevant parts are:\n\n* Python 3.10.12\n* `sentry-sdk==2.55.0`\n* `starlette==1.0.0`\n* no jinja2\n\n\n### Expected Result\n\nworks nice and quiet like\n\n### Actual Result\n\n```\n...\n File \"/app/thing/settings.py\", line 924, in sentry_init_with_profiling\n return sentry_sdk.init(integrations=[])\n File \"/venv/lib/python3.10/site-packages/sentry_sdk/_init_implementation.py\", line 57, in _init\n client = sentry_sdk.Client(*args, **kwargs)\n File \"/venv/lib/python3.10/site-packages/sentry_sdk/client.py\", line 283, in __init__\n self._init_impl()\n File \"/venv/lib/python3.10/site-packages/sentry_sdk/client.py\", line 435, in _init_impl\n self.integrations = setup_integrations(\n File \"/venv/lib/python3.10/site-packages/sentry_sdk/integrations/__init__.py\", line 258, in setup_integrations\n type(integration).setup_once()\n File \"/venv/lib/python3.10/site-packages/sentry_sdk/integrations/starlette.py\", line 137, in setup_once\n patch_templates()\n File \"/venv/lib/python3.10/site-packages/sentry_sdk/integrations/starlette.py\", line 555, in patch_templates\n from starlette.templating import Jinja2Templates # type: ignore\n File \"/venv/lib/python3.10/site-packages/starlette/templating.py\", line 28, in \u003cmodule>\n raise ImportError(\"jinja2 must be installed to use Jinja2Templates\") from _import_error\nImportError: jinja2 must be installed to use Jinja2Templates\n```","author":{"url":"https://github.com/craigds","@type":"Person","name":"craigds"},"datePublished":"2026-03-23T22:40:34Z","url":"https://github.com/getsentry/sentry-python/issues/5782"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:05c38c33-4b7b-fae6-d6e9-ae9ac4249f08 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DCF8:2E3FEE:744C3A:94CD78:6B00E392 |
| html-safe-nonce | f2bb83140456dd311f3de3691702530e99ce434e63417aae9128e1e912dff881 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQ0Y4OjJFM0ZFRTo3NDRDM0E6OTRDRDc4OjZCMDBFMzkyIiwidmlzaXRvcl9pZCI6Ijc5OTQ3OTM4NjkwODAzMjI5NjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 238ad25a14c0bffabee672d0038fa4df2693bcd0bb0c6c14c98feb30994c6d90 |
| hovercard-subject-tag | issue:4124119847 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-python/5782/issue_layout |
| twitter:image | https://opengraph.githubassets.com/62fdce2d6121fdc44613d871e7114d65d999269e43f6c71655dfe3579ccc7aee/getsentry/sentry-python/issues/5782 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/62fdce2d6121fdc44613d871e7114d65d999269e43f6c71655dfe3579ccc7aee/getsentry/sentry-python/issues/5782 |
| og:image:alt | How do you use Sentry? Self-hosted/on-premise Version 2.55.0 Steps to Reproduce After upgrading to starlette 1.0.0, we've started getting ImportErrors from sentry init. pip freeze is gigantic but t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | craigds |
| hostname | github.com |
| expected-hostname | github.com |
| None | 27088b6977484d0d3321d9a11c907c6d6637b315cfa359ef7952dbf6292f9b14 |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 137814779 |
| octolytics-dimension-repository_nwo | getsentry/sentry-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 137814779 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 624179fb8b88d26ba5bba08894eb60a1c5a1d93d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width