-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"ImportError: cannot import name 'StarletteIntegration' from 'sentry_sdk.integrations.starlette'" after sentry version update #1603
Comments
From what I see everything looks good and it should work. The file that StarletteIntegration is try to import from is there and StarletteIntegration is also in there. From the Hope this helps solving your problem! |
We're seeing this issue too, in a project that uses neither fastapi or starlette. My theory is it's due to the order the auto enabling integrations runs: It tries StarletteIntegration, which raises For now, we've switched off the auto enabling integrations to workaround. |
This issue still exists as of version |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Hi there We specifically set our integrations to be: integrations=[
sentry_sdk.integrations.celery.CeleryIntegration(),
sentry_sdk.integrations.flask.FlaskIntegration(),
sentry_sdk.integrations.sqlalchemy.SqlalchemyIntegration(),
] But we keep getting the error:
This started after we bumped from Sentry SDK 0.20.3 to 1.11.1 |
@antonpirker No indication that this has been resolved. I will double-check and post an update... could you please re-open for now? |
Confirming that this issue still exists with version |
If this doesn't get reopened and if someone else finds this, I did the same as one of the users has mentioned above which is to disable auto-enabling integrations as a workaround:
|
@antonpirker this is not resolved so re-opening, please take a look once you're back |
When loading FastAPI integration also check if StarletteIntegration can actually be loaded. (Because Starlette is a requirement for FastAPI) Fixes #1603
How do you use Sentry?
Sentry Saas (sentry.io)
Version
1.9.7
Steps to Reproduce
It only happens every once in a while so it is not easy to reproduce.
Here is my
sentry.py
(see exception trace below):Here is the output of
pip list
on the failing container:This has not happened when I pin
sentry-sdk
version to1.9.5
, so I think it must have been introduced in either1.9.6
or1.9.7
.Expected Result
No crash on sentry initialization.
Actual Result
The text was updated successfully, but these errors were encountered: