Pydantic import error : BaseSettings
has been moved to the pydantic-settings
package.
#69
Open
3 of 4 tasks
Labels
Checklist
Summary
streamlit-pydantic does not work with recent Pydantic versions
When importing the module , we have : Pydantic import error :
BaseSettings
has been moved to thepydantic-settings
package.Reproducible Code Example
Steps To Reproduce
Just run basic examples
Expected Behavior
No response
Current Behavior
Traceback (most recent call last):
File "/home/tcl/prj/genai-blueprint/python/test.py", line 2, in
import streamlit_pydantic as sp
File "/home/tcl/.cache/pypoetry/virtualenvs/genai-blueprint-2X6HL8i2-py3.12/lib/python3.12/site-packages/streamlit_pydantic/init.py", line 9, in
from .settings import StreamlitSettings
File "/home/tcl/.cache/pypoetry/virtualenvs/genai-blueprint-2X6HL8i2-py3.12/lib/python3.12/site-packages/streamlit_pydantic/settings.py", line 4, in
from pydantic import BaseSettings
File "/home/tcl/.cache/pypoetry/virtualenvs/genai-blueprint-2X6HL8i2-py3.12/lib/python3.12/site-packages/pydantic/init.py", line 412, in getattr
return _getattr_migration(attr_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tcl/.cache/pypoetry/virtualenvs/genai-blueprint-2X6HL8i2-py3.12/lib/python3.12/site-packages/pydantic/_migration.py", line 296, in wrapper
raise PydanticImportError(
pydantic.errors.PydanticImportError:
BaseSettings
has been moved to thepydantic-settings
package. See https://docs.pydantic.dev/2.10/migration/#basesettings-has-moved-to-pydantic-settings for more details.Is this a regression?
Debug info
Additional Information
No response
The text was updated successfully, but these errors were encountered: