Russell-Newton / TikTokPy

Extract data from TikTok without needing any login information or API keys.
https://pypi.org/project/tiktokapipy/
MIT License
213 stars 28 forks source link

[BUG] ModuleNotFoundError: No module named 'pydantic._internal' #52

Closed stolenvw closed 1 year ago

stolenvw commented 1 year ago

Getting this with version 0.2.0.post1

from tiktokapipy.async_api import AsyncTikTokAPI

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/user/django-test/.venv/lib/python3.10/site-packages/tiktokapipy/async_api.py", line 14, in <module>
    from tiktokapipy.api import TikTokAPI
  File "/home/user/django-test/.venv/lib/python3.10/site-packages/tiktokapipy/api.py", line 15, in <module>
    from tiktokapipy.models.challenge import Challenge
  File "/home/user/django-test/.venv/lib/python3.10/site-packages/tiktokapipy/models/__init__.py", line 12, in <module>
    from pydantic._internal._model_construction import ModelMetaclass
ModuleNotFoundError: No module named 'pydantic._internal'

pip freeze versions pydantic==1.10.4 tiktokapipy==0.2.0.post1

Russell-Newton commented 1 year ago

I forgot to pin it in the requirements, but if you update to pudantic>=2 this will be fixed.

stolenvw commented 1 year ago

need to fix your requirements got this when updating tiktokapipy Requirement already satisfied: pydantic in ./.venv/lib/python3.10/site-packages (from tiktokapipy==0.2.0.post1->-r requirements.txt (line 11)) (1.10.4)

will try updating it

stolenvw commented 1 year ago

updating pydantic to 2.0.2 did fix the issues, Thank you