meilisync icon indicating copy to clipboard operation
meilisync copied to clipboard

pydantic.errors.PydanticImportError: `BaseSettings` has been moved

Open hirefrank opened this issue 2 years ago • 7 comments

$ meilisync --help

Alamalinux 9.

LMK if you have any ideas on how to resolve -- thx

Traceback (most recent call last):
  File "/srv/proj/.venv/bin/meilisync", line 5, in <module>
    from meilisync.main import app
  File "/srv/proj/.venv/lib64/python3.9/site-packages/meilisync/main.py", line 8, in <module>
    from meilisync.discover import get_progress, get_source
  File "/srv/proj/.venv/lib64/python3.9/site-packages/meilisync/discover.py", line 7, in <module>
    from meilisync import progress, source
  File "/srv/proj/.venv/lib64/python3.9/site-packages/meilisync/source/__init__.py", line 4, in <module>
    from meilisync.settings import Sync
  File "/srv/proj/.venv/lib64/python3.9/site-packages/meilisync/settings.py", line 3, in <module>
    from pydantic import BaseModel, BaseSettings, Extra
  File "/srv/proj/.venv/lib64/python3.9/site-packages/pydantic/__init__.py", line 218, in __getattr__
    return _getattr_migration(attr_name)
  File "/srv/proj/.venv/lib64/python3.9/site-packages/pydantic/_migration.py", line 294, in wrapper
    raise PydanticImportError(
pydantic.errors.PydanticImportError: `BaseSettings` has been moved to the `pydantic-settings` package. See https://docs.pydantic.dev/2.4/migration/#basesettings-has-moved-to-pydantic-settings for more details.

hirefrank avatar Oct 11 '23 17:10 hirefrank

Try latest source code

long2ice avatar Oct 13 '23 01:10 long2ice

Does pip install meilisync not pull the latest?

hirefrank avatar Oct 13 '23 01:10 hirefrank

No, not release

long2ice avatar Oct 13 '23 01:10 long2ice

Ah got it. Thx

hirefrank avatar Oct 13 '23 01:10 hirefrank

Apologies for being dense -- how do I use the code in the repo? Do I need to build it first?

hirefrank avatar Oct 15 '23 19:10 hirefrank

To install the dev branch:

python -m pip install git+https://github.com/long2ice/meilisync.git@dev

sanders41 avatar Oct 16 '23 17:10 sanders41

Thank you

On Mon, Oct 16, 2023, 1:55 PM Paul Sanders @.***> wrote:

To install the dev branch:

python -m pip install pip install @.***

— Reply to this email directly, view it on GitHub https://github.com/long2ice/meilisync/issues/23#issuecomment-1764990312, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABMW5TMXNO2QFFO4LX367DX7VYJRAVCNFSM6AAAAAA54LQ7ACVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRUHE4TAMZRGI . You are receiving this because you authored the thread.Message ID: @.***>

hirefrank avatar Oct 16 '23 18:10 hirefrank