You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've created a carsharing app, which has car and trip classes. Both have a back populates relationship on them with the other object. I am using SQLite, and database already has a Car table with 2 entries, and trip table with 3 entries as shown in the example code.
I want to return car when a GET call is made with Car_id as input.
But getting an internal server error as below
car.trips.append(triplist)
AttributeError: 'Car' object has no attribute 'trips'
read the documentation and still not able to resolve. Appreciate any help. code.zip
Operating System
Windows
Operating System Details
No response
SQLModel Version
0.0.6
Python Version
3.9.4
Additional Context
No response
The text was updated successfully, but these errors were encountered:
I agree with @Apollo314's assessment. We are also seeing this problem in our project, and pinning sqlalchemy==1.4.35 solves the problem, as documented in #315.
Thanks a lot folks. I will try downgrading to .35 and see how that goes. M sure thats the reason, because thats the only thing that made sense so far while debugging. Appreciate the help.
First Check
Commit to Help
Example Code
Description
I've created a carsharing app, which has car and trip classes. Both have a back populates relationship on them with the other object. I am using SQLite, and database already has a Car table with 2 entries, and trip table with 3 entries as shown in the example code.
I want to return car when a GET call is made with Car_id as input.
But getting an internal server error as below
car.trips.append(triplist)
AttributeError: 'Car' object has no attribute 'trips'
read the documentation and still not able to resolve. Appreciate any help.
code.zip
Operating System
Windows
Operating System Details
No response
SQLModel Version
0.0.6
Python Version
3.9.4
Additional Context
No response
The text was updated successfully, but these errors were encountered: