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 would like to split the many-to-many models into different .py.
Error
File "C:\Users\duduru\AppData\Local\pypoetry\Cache\virtualenvs\backend-Clwg8yIO-py3.10\lib\site-packages\sqlmodel\main.py", line 658, in get_sqlalchemy_type
if issubclass(type_, Enum):
TypeError: issubclass() arg 1 must be a class
I am using pydantic 1.10 with SQLModel 0.0.8.
Now I upgraded to pydantic 2.8 with SQLModel 0.0.21 and I have problems.
Operating System
Windows
Operating System Details
No response
SQLModel Version
0.0.21
Python Version
3.10.11
Additional Context
File "C:\Code\Python\ACS\backend\app\models\link.py", line 30, in <module>
class ApiLinkModel(BaseCreatedAtModel, ApiLinkBase, table=True):
File "C:\Users\duduru\AppData\Local\pypoetry\Cache\virtualenvs\backend-Clwg8yIO-py3.10\lib\site-packages\sqlmodel\main.py", line 559, in __new__
col = get_column_from_field(v)
File "C:\Users\duduru\AppData\Local\pypoetry\Cache\virtualenvs\backend-Clwg8yIO-py3.10\lib\site-packages\sqlmodel\main.py", line 710, in get_column_from_field
sa_type = get_sqlalchemy_type(field)
File "C:\Users\duduru\AppData\Local\pypoetry\Cache\virtualenvs\backend-Clwg8yIO-py3.10\lib\site-packages\sqlmodel\main.py", line 658, in get_sqlalchemy_type
if issubclass(type_, Enum):
TypeError: issubclass() arg 1 must be a class
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
-
Example Code
api.py
link.py
role.py
Description
I would like to split the many-to-many models into different .py.
Error
I am using pydantic 1.10 with SQLModel 0.0.8.
Now I upgraded to pydantic 2.8 with SQLModel 0.0.21 and I have problems.
Operating System
Windows
Operating System Details
No response
SQLModel Version
0.0.21
Python Version
3.10.11
Additional Context
Beta Was this translation helpful? Give feedback.
All reactions