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 just upgraded my code to SQLModel 0.0.14 (and Pydantic 2.5, SQLAlchemy 2.0.23). However, when I run the minimal example above, I immediately get the following error:
'Hero' object has no attribute '__pydantic_extra__'
File "scratch.py", line 11, in <module>
h1 = Hero(id=1)
^^^^^^^^^^
AttributeError: 'Hero' object has no attribute '__pydantic_extra__'
When I apply the patch here, it solves the issue in the example. However, in a longer example like below, specifically when getting models from the database, I still get the same __pydantic_extra__ error:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
First Check
Commit to Help
Example Code
Description
I've just upgraded my code to SQLModel 0.0.14 (and Pydantic 2.5, SQLAlchemy 2.0.23). However, when I run the minimal example above, I immediately get the following error:
When I apply the patch here, it solves the issue in the example. However, in a longer example like below, specifically when getting models from the database, I still get the same
__pydantic_extra__
error:Does anyone have any ideas of what I could try, what I'm doing wrong, or where I should look to find the source and submit a PR?
Operating System
macOS
Operating System Details
No response
SQLModel Version
0.0.14
Python Version
3.11.6
Additional Context
Pydantic 2.5.3
SQLAlchemy 2.0.23
Beta Was this translation helpful? Give feedback.
All reactions