Hi has anyone had this error before? `Failed to l...
# prefect-community
r
Hi has anyone had this error before?
Failed to load and execute Flow's environment: UnpicklingError("invalid load key, '{'.")
Happened in Prefect Cloud.
g
Hey there, I am encountering the same problem. Did you manage to find the cause or a workaround?
r
yes. I had 2 Environments and one had the issue while the other did not. I searched for the error and it seamed to have something to do with cloudpickle. In the end i changed the requirements for the virtual environment executing registering the flow to be:
Copy code
prefect==0.14.1
cloudpickle==1.6.0
Thats it.
🙌 1
s
Hey @Rolf Schick @Giovanni After I finally managed to run ECR Run after adding run_task_kwargs, I ran into this same issue. Looking to solve it now with your recommendation
Copy code
Failed to load and execute Flow's environment: UnpicklingError("invalid load key, '{'.")
This error
k
I’m having this same issue on version
0.14.5
of prefect server and client. Unsurprisingly, just changing the version of cloudpickle in the client env doesn’t fix the problem. Are there containers built with the fix?
j
This is likely due to registering a prefect flow with a version >= 0.14.3, but executing it in an environment with prefect < 0.14.3. A change was made in the storage format in 0.14.3.
If you' are for sure executing the flow in an environment with prefect >= 0.14.3 and still seeing this issue, we'd need a reproducible example to debug further.
Note that the change made in 0.14.3 doesn't break any of our compatibility guarantees - we recommend deploying prefect flows in environments with the same version they were registered with. After 0.14.3 you'll also see warnings if the versions mismatch.
k
👍 - I think my docker container has an older version in it - will give that a try
thanks again @Jim Crist-Harif - this worked. Incidentally - I also had to add a run_config or I ran into this error: https://prefect-community.slack.com/archives/CL09KU1K7/p1611844979375200 Just in case people upgrading miss the memo like me 🙂