So I did some investigation into this issue.
If I run the Tutorial 003 script with SQLAlchemy < 1.4.36 I get no problems. Likewise with postgres as the database.
If I use SQLAlchemy = 1.4.36 I get this error:
I'm facing the same issue, how do we choose to use the older sqlalchemy version? We just install SQLModel and I'm not seeing the sqlalchemy in dependency list in pyproject.toml as I use poetry.. Im aware that SQLModel uses SQLAlchemy in backstage..
@arjunkayalmoni you should just pin the version of sqlalchemy.
You can do that by installing sqlalchemy as the right version and Poetry will take care of resolving the dependencies of SQLModel
Activity
ocni-dtu commented on May 17, 2022
So I did some investigation into this issue.
If I run the Tutorial 003 script with SQLAlchemy < 1.4.36 I get no problems. Likewise with postgres as the database.
If I use SQLAlchemy = 1.4.36 I get this error:
ocni-dtu commented on May 17, 2022
If I instead change the version with postgres as database to async I get this error no mater, which version of SQLAlchemy I use:
ocni-dtu commented on May 17, 2022
Okay, so with a little more tweaking of the async code I got it to work.
My SQLAlchemy is stil < 1.4.36:
sqlalchemy[asyncio] == 1.4.35
What I needed was to add several selectinload options to the queries in update_heroes
ocni-dtu commented on May 17, 2022
Related to #322
fullstack-spiderman commented on May 26, 2022
I'm facing the same issue, how do we choose to use the older sqlalchemy version? We just install SQLModel and I'm not seeing the sqlalchemy in dependency list in pyproject.toml as I use poetry.. Im aware that SQLModel uses SQLAlchemy in backstage..
ocni-dtu commented on May 29, 2022
@arjunkayalmoni you should just pin the version of sqlalchemy.
You can do that by installing sqlalchemy as the right version and Poetry will take care of resolving the dependencies of SQLModel
fullstack-spiderman commented on May 30, 2022
Thank you @ocni-dtu, yes I done that already with a suggestion by my co-worker, and it indeed worked.. thank you again.. :)