moto
September 18, 2024, 12:27am
1
do other people get this or is it something in my config? It’s been there for awhile and did not go away with 0.60.0
/Users/ai/anaconda3/envs/crewaitestbed/lib/python3.11/site-packages/pydantic/_internal/_config.py:341: UserWarning: Valid config keys have changed in V2:
‘allow_population_by_field_name’ has been renamed to ‘populate_by_name’
‘smart_union’ has been removed
warnings.warn(message, UserWarning)
1 Like
matt
September 18, 2024, 12:29am
2
That warning is present in earlier version as well, it can be ignored
matt
September 18, 2024, 8:34am
4
The issue comes from one of our dependencies but it’s hard to track down
Dabnis
September 18, 2024, 9:07am
5
@matt @moto ,
I spent time fixing this issue yesterday on my system, Pydantic version compatibility issues
Here’s my project toml file:
[tool.poetry]
name = "pydantic_crew"
version = "0.1.0"
description = "pydantic using crewAI"
authors = ["jonathn@dabnis.com"]
[tool.poetry.dependencies]
python = ">=3.10,<=3.13"
crewai = { version = ">=0.55.2,<1.0.0", extras = ["tools"] }
pydantic = ">=2.4.2,<3.0.0"
[tool.poetry.scripts]
pydantic = "pydantic.main:run"
run_crew = "pydantic.main:run"
train = "pydantic.main:train"
replay = "pydantic.main:replay"
test = "pydantic.main:test"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Take note of : pydantic = “>=2.4.2,<3.0.0”
I then ran poetry install & the error has gone.
To test I do a crewai version from CLI, the error normally showed there, now I get:
No errors, or warnings here
When I run a crew I do get a couple of new depreciation warnings, but the old ones have gone:
Depreciation warnings are from Paramiko , a Python SSH2 implementation package that will need to be updated.