We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi. I'm getting this error when trying to use sqlalchemy.orm.Session as a context manager.
My code: with sa.orm.Session(some_app) as session:
with sa.orm.Session(some_app) as session:
Errors: error: "Session" has no attribute "enter"; maybe "iter"? error: "Session" has no attribute "exit"
Package versions: SQLAlchemy=1.4.23 sqlalchemy-stubs=0.4
P.S. This is the first time I'm writing an issue. If you need any clarification or suggestions, please, feel free to ask :)
The text was updated successfully, but these errors were encountered:
I also have this issue. It occurs when using the session with a with block as per the documentation here:
with
https://docs.sqlalchemy.org/en/14/orm/session_basics.html#using-a-sessionmaker
cli/destroy.py:24: error: "Session" has no attribute "enter"; maybe "iter"? cli/destroy.py:24: error: "Session" has no attribute "exit"
However pydoc3 shows it does have a enter method, and code using it works.
pydoc3 sqlalchemy.orm.session.Session
Sorry, something went wrong.
No branches or pull requests
Hi. I'm getting this error when trying to use sqlalchemy.orm.Session as a context manager.
My code:
with sa.orm.Session(some_app) as session:
Errors:
error: "Session" has no attribute "enter"; maybe "iter"?
error: "Session" has no attribute "exit"
Package versions:
SQLAlchemy=1.4.23
sqlalchemy-stubs=0.4
P.S.
This is the first time I'm writing an issue. If you need any clarification or suggestions, please, feel free to ask :)
The text was updated successfully, but these errors were encountered: