Hi, it seems that rhhub2 is not cooperating with pydantic v2.
When I install rfhub2 locally pip install rfhub2 and try to start the application with the command rfhub2 I get the following error: TypeError: To define root models, use 'pydantic.RootModel' rather than a field called '__root__'
the whole trace back:
File "C:\Users\zminkows\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\zminkows\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\Scripts\rfhub2.exe\__main__.py", line 4, in <module> File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\__main__.py", line 7, in <module> from rfhub2.main import app File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\main.py", line 1, in <module> from rfhub2.app import create_app File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\app.py", line 6, in <module> from rfhub2.api.router import api_router File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\api\router.py", line 3, in <module> from rfhub2.api.endpoints import ( File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\api\endpoints\collections.py", line 6, in <module> from rfhub2.api.utils.db import get_collection_repository File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\api\utils\db.py", line 3, in <module> from rfhub2.db.repository.keyword_repository import KeywordRepository File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\db\repository\keyword_repository.py", line 8, in <module> from rfhub2.db.base import Collection, Keyword, KeywordStatistics File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\db\base.py", line 2, in <module> from rfhub2.db.model.keyword import Keyword File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\db\model\keyword.py", line 8, in <module> from rfhub2 import model File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\model\__init__.py", line 16, in <module> class TagList(BaseModel): File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\pydantic\_internal\_model_construction.py", line 95, in __new__ private_attributes = inspect_namespace( File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\pydantic\_internal\_model_construction.py", line 279, in inspect_namespace raise TypeError("To define root models, use 'ydantic.RootModel' rather than a field called '__root__'") TypeError: To define root models, use 'pydantic.RootModel' rather than a field called '__root__'
Hi, it seems that rhhub2 is not cooperating with pydantic v2. When I install rfhub2 locally
pip install rfhub2
and try to start the application with the commandrfhub2
I get the following error:TypeError: To define root models, use 'pydantic.RootModel' rather than a field called '__root__'
the whole trace back:
File "C:\Users\zminkows\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\zminkows\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\Scripts\rfhub2.exe\__main__.py", line 4, in <module> File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\__main__.py", line 7, in <module> from rfhub2.main import app File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\main.py", line 1, in <module> from rfhub2.app import create_app File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\app.py", line 6, in <module> from rfhub2.api.router import api_router File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\api\router.py", line 3, in <module> from rfhub2.api.endpoints import ( File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\api\endpoints\collections.py", line 6, in <module> from rfhub2.api.utils.db import get_collection_repository File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\api\utils\db.py", line 3, in <module> from rfhub2.db.repository.keyword_repository import KeywordRepository File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\db\repository\keyword_repository.py", line 8, in <module> from rfhub2.db.base import Collection, Keyword, KeywordStatistics File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\db\base.py", line 2, in <module> from rfhub2.db.model.keyword import Keyword File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\db\model\keyword.py", line 8, in <module> from rfhub2 import model File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\rfhub2\model\__init__.py", line 16, in <module> class TagList(BaseModel): File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\pydantic\_internal\_model_construction.py", line 95, in __new__ private_attributes = inspect_namespace( File "C:\Users\zminkows\PycharmProjects\pythonProject\Playground\rfhub2_venv\lib\site-packages\pydantic\_internal\_model_construction.py", line 279, in inspect_namespace raise TypeError("To define root models, use 'ydantic.RootModel' rather than a field called '__root__'") TypeError: To define root models, use 'pydantic.RootModel' rather than a field called '__root__'