-
Notifications
You must be signed in to change notification settings - Fork 127
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
AttributeError: 'Session' object has no attribute 'transaction' #331
Comments
Thanks, I just bumped into this as well. I will take a look further and see why this is happening. I will try to get a PR done. |
I'm fixing this as part of #326 |
this appears to happen for me if i use sqlalchemy 2.0 |
thanks @marksteward |
SQLAlchemy-Continuum is currently none functional with SQLAlchemy 2.0: kvesteri/sqlalchemy-continuum#331 kvesteri/sqlalchemy-continuum#326
in sqlalchemy 2.0 they replace transaction with _transaction |
So just for others coming to this issue, I did succeed in using SQLAlchemy 2.0 with continuum. I had found this error because my version of continuum was old but upgrading continuum & sqlalchemy_utils fixed it. But for further context, I was upgrading a project of mine which I haven't touched in a few years so I've also migrated from psycopg2 to psycopg3 in the process of fixing this so not sure how relevant that may have been. |
Getting the same traceback using sqlalchemy-continuum with sqlalchemy and flask-sqlalchemy. I've tried both and I still get this:
I changed line 365 in manager.py to
if session.get_transaction().nested:
and my traceback went away. Not sure if this is the correct behavior, but for some reason I'm getting an error and that made it go away.The text was updated successfully, but these errors were encountered: