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
Using pydantic V2 import starlette_admin.contrib.odmantic.Admin results in an import error because pydantic.color is moved to pydantic_extra_types.color.
from starlette_admin.contrib.odmantic import Admin
raises this error
File "/usr/local/lib/python3.11/site-packages/starlette_admin/contrib/odmantic/converters.py", line 55, in <module>
class ModelConverter(BaseODMModelConverter):
File "/usr/local/lib/python3.11/site-packages/starlette_admin/contrib/odmantic/converters.py", line 120, in ModelConverter
@converts(pydantic.color.Color)
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pydantic/__init__.py", line 363, in __getattr__
return _getattr_migration(attr_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pydantic/_migration.py", line 306, in wrapper
raise AttributeError(f'module {module!r} has no attribute {name!r}')
AttributeError: module 'pydantic' has no attribute 'color'
Environment (please complete the following information):
Starlette-Admin version: 0.12.2
ORM/ODMs: ODMantic
Additional context
pydantic version: 2.5.3
The text was updated successfully, but these errors were encountered:
Describe the bug
Using pydantic V2
import starlette_admin.contrib.odmantic.Admin
results in an import error because pydantic.color is moved to pydantic_extra_types.color.See the migration guide to V2.
To Reproduce
raises this error
Environment (please complete the following information):
Additional context
pydantic version: 2.5.3
The text was updated successfully, but these errors were encountered: