long2ice / meilisync

Realtime sync data from MySQL/PostgreSQL/MongoDB to Meilisearch
https://github.com/long2ice/meilisync
Apache License 2.0
247 stars 37 forks source link

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

Open hirefrank opened 10 months ago

hirefrank commented 10 months ago

$ 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.
long2ice commented 10 months ago

Try latest source code

hirefrank commented 10 months ago

Does pip install meilisync not pull the latest?

long2ice commented 10 months ago

No, not release

hirefrank commented 10 months ago

Ah got it. Thx

hirefrank commented 10 months ago

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

sanders41 commented 10 months ago

To install the dev branch:

python -m pip install git+https://github.com/long2ice/meilisync.git@dev
hirefrank commented 10 months ago

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: @.***>