David Maier
10/09/2023, 2:45 PMAttributeError: 'Flow' object has no attribute 'serve'
.alex
10/09/2023, 2:47 PMprefect
do you have installed? Sharing the output of prefect version
would be great!David Maier
10/09/2023, 2:48 PMVersion: 2.82
API version: 0.8.4
Python version: 3.9.14
Git commit: afbed19d
Built: Fri, Feb 17, 2023 10:02 AM
OS/Arch: darwin/arm64
Profile: default
Server type: cloud
David Maier
10/09/2023, 2:48 PMprefect = "^2.13"
David Maier
10/09/2023, 2:49 PMpython = ">=3.9,<3.11"
requests = "^2.27.1"
prefect = "^2.13"
prefect-dask = "^0.2.5"
redis = "^4.1.1"
cleo = "^0.8.1"
boto = "^2.49.0"
boto3 = "^1.22.4"
scipy = "^1.8.1"
plotly-express = "0.4.0"
kaleido = "0.2.1"
markdown = "3.3.7"
sendgrid = "6.9.7"
pydantic = "<2.0.0"
alex
10/09/2023, 2:49 PMpoetry
? I remember seeing another user that used poetry
that had a similar issue and a similar prefect version
output.David Maier
10/09/2023, 2:53 PMalex
10/09/2023, 2:57 PMprefect
is 2.13.5
, but poetry
installed a version that is nearly eight months old, which is why .serve
isn’t working for you.David Maier
10/09/2023, 2:57 PMpydantic
version because the CLI would otherwise not work as expected. It seems that at least one of my other dependencies does refer to a newer version because I didn’t have pydantic
listed as an explicit dependency before.David Maier
10/09/2023, 2:57 PMalex
10/09/2023, 2:58 PMpydantic
then that might cause this behavior. Can you share the error that you saw from the CLI?David Maier
10/09/2023, 3:10 PMImportError: cannot import name 'SecretField' from 'pydantic'
David Maier
10/09/2023, 3:11 PM2.13.5
now and also removed the hardcoded pydantic
version from my Poetry environment … so fingers crossed.alex
10/09/2023, 8:23 PMpoetry
are you using?David Maier
10/10/2023, 8:06 AMDavid Maier
10/10/2023, 8:07 AMDavid Maier
10/10/2023, 8:08 AMpoetry update
ended up in an endless loop 🤷, so I am now using Poetry 1.6.1.David Maier
10/10/2023, 8:08 AMserve
function works now as expected. Thanks!