https://prefect.io logo
s

Santiago Gonzalez

07/19/2023, 6:21 PM
Hi Guys, I have an issue. I have a repo that have several prefect flows, and when I run tests (that 23 days ago succeeded) it fails, and not sure why. this is the error I got
Copy code
ImportError: cannot import name 'SecretField' from 'pydantic' (/usr/local/lib/python3.8/site-packages/pydantic/__init__.py)
Dependencies:
Copy code
boto3==1.24.59
prefect==2.10.9
prefect-aws==0.3.1
prefect-databricks==0.1.4
psycopg2-binary==2.9.6
wheel==0.40.0
moto==4.1.4
asyncpg==0.27.0
pytest-asyncio==0.21.0
s3fs==2023.1.0
ta_bitwarden_cli==0.8.2
Also I ’ve tried upgrading prefect to
2.10.21
, but still failing.
✅ 1
a

Adam Azzam

07/19/2023, 6:29 PM
When you pip freeze what version of pydantic do you see?
s

Santiago Gonzalez

07/19/2023, 6:32 PM
pydantic==1.10.9
j

Jeff Hale

07/20/2023, 1:44 PM
Strange that upgrading Prefect didn't do the trick. We were seeing this issue with some older Prefect versions. Pinning pydantic should work. See discussion here: https://prefect-community.slack.com/archives/C048K0MGHNK/p1688730271791369?thread_ts=1688572618.294519&cid=C048K0MGHNK Could try changing to pydantic 1.10.6. I have a feeling the environment isn't picking up your new version of Prefect for some reason. If you use a new virtual environment it should be fine.
s

Santiago Gonzalez

07/20/2023, 1:52 PM
Thanks for your reply. It happens to me only when it runs over Jenkins pipeline (on my local machine it works fine). I will try your solution.
Hi, I wanted to let you know that the issue has been fixed, upgrading to Prefect 2.11.0
🙌 1
thanks