okld / streamlit-elements

Create a draggable and resizable dashboard in Streamlit, featuring Material UI widgets, Monaco editor (Visual Studio Code), Nivo charts, and more!
MIT License
730 stars 82 forks source link

Streamlit demo has an Uncaught app exception: `BaseSettings` has been moved to the `pydantic-settings` package. #34

Open danielduckworth opened 6 months ago

danielduckworth commented 6 months ago
2024-05-02 12:05:32.674 Uncaught app exception
Traceback (most recent call last):
  File "/home/vscode/.local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 584, in _run_script
    exec(code, module.__dict__)
  File "/workspaces/streamlit-gallery/streamlit_app.py", line 3, in <module>
    from streamlit_gallery import apps, components
  File "/workspaces/streamlit-gallery/streamlit_gallery/components/__init__.py", line 5, in <module>
    from .pandas_profiling.streamlit_app import main as pandas_profiling
  File "/workspaces/streamlit-gallery/streamlit_gallery/components/pandas_profiling/streamlit_app.py", line 2, in <module>
    import pandas_profiling
  File "/home/vscode/.local/lib/python3.11/site-packages/pandas_profiling/__init__.py", line 6, in <module>
    from pandas_profiling.controller import pandas_decorator
  File "/home/vscode/.local/lib/python3.11/site-packages/pandas_profiling/controller/pandas_decorator.py", line 4, in <module>
    from pandas_profiling.profile_report import ProfileReport
  File "/home/vscode/.local/lib/python3.11/site-packages/pandas_profiling/profile_report.py", line 13, in <module>
    from pandas_profiling.config import Config, Settings
  File "/home/vscode/.local/lib/python3.11/site-packages/pandas_profiling/config.py", line 5, in <module>
    from pydantic import BaseModel, BaseSettings, Field
  File "/home/vscode/.local/lib/python3.11/site-packages/pydantic/__init__.py", line 386, in __getattr__
    return _getattr_migration(attr_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/pydantic/_migration.py", line 296, in wrapper
    raise PydanticImportError(
pydantic.errors.PydanticImportError: `BaseSettings` has been moved to the `pydantic-settings` package. See https://docs.pydantic.dev/2.7/migration/#basesettings-has-moved-to-pydantic-settings for more details.

For further information visit https://errors.pydantic.dev/2.7/u/import-error