-
Notifications
You must be signed in to change notification settings - Fork 517
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
SQLAlchemy Scoped Session - ValueError: generator already executing #1132
Comments
Any update on this? |
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 🥀 |
Hello @bobbydams and @sp1rs ! Could you please verify if this problem still exists with the newest Python SDK and can you give us a minimal example project where we could reproduce this? Thanks a lot! |
@antonpirker |
Faced exactly the same problem. As a result of the research, the case turned out to be in the context manager based on the generator. The generator in python is not thread safe. As a result, this error appears. As a solution, I propose to replace the context manager with a Class-based context manager. Checked on my project, everything works fine |
ok I spent an afternoon trying to repro this with |
'fixed' by #1368 for now, pls reopen if issue persists. |
Hello,
In part of our code we use scoped sessions from SQLAlchemy. Frequently we run into the error
ValueError: generator already executing
(see screenshot). The only workaround we've found at the moment is to setauto_enabling_integrations=False
in thesentry.init
function.Let me know if any additional information is needed. Thanks!
Environment
How do you use Sentry?
on-premise v21.5.1
Which SDK and version?
Python v3.8, Sentry SDK 1.1.0
Steps to Reproduce
Creating a scoped session
This bug seems to be triggered by this bit of code:
Expected Result
There should be no errors thrown by the sentry-sdk
Actual Result
Dependencies
The text was updated successfully, but these errors were encountered: