I can’t find an environment variable in my flow ru...
# prefect-community
j
I can’t find an environment variable in my flow run. The error includes a message
This may be due to one of the following version mismatches between the flow build and execution environments:\n - python: (flow built with '3.7.13', currently running with '3.7.12')")
The CI/CD system registering my flow I guess is using python 3.7.13. But how do I know what the execution environment python is if it’s executing from a docker image in a prefect docker agent?
k
You can exec into the base image and check I think? I actually suspect this is a
cloudpickle
version issue more than python version. So check Prefect and cloudpickle versions
j
Yeah the logs do also mention the error occurred while unpickling the flow
How do I check the
cloudpickle
version?
the base image’s python version is 3.7.12
k
Maybe
pip show cloudpickle
inside the base image?
j
Copy code
pip show cloudpickle
Name: cloudpickle
Version: 1.6.0
Summary: Extended pickling support for Python objects
Home-page: <https://github.com/cloudpipe/cloudpickle>
Author: Cloudpipe
Author-email: <mailto:cloudpipe@googlegroups.com|cloudpipe@googlegroups.com>
License: BSD 3-Clause License
Location: /usr/local/lib/python3.7/site-packages
Requires:
Required-by: dask, distributed, gym, mlflow, prefect, shap
that’s a version from August 25, 2020. there’s since been a 2.0.0 release and a 2.1.0 release. Would that cause an issue?
k
It would if your registration was on the 2.0 or 2.1
j
I guess that is theoretically possible, but I’m pinning my dependencies, so I did not think that would happen
k
How about agent cloudpickle version?
j
how do I check the agent cloudpickle version?
k
Same thing in the same box/environment as the agent.
pip show cloudpickle
j
you mean on the host?
k
Yes!
j
ah I’m running python 3.8 on the host where the prefect agent is running. and
pip show cloudpickle
on the VM/host showed 2.0.0
I’ll try installing 1.6.0 on the box and rerunning
still the same issue. Would i have to install python 3.7.12 on the host?
k
Normally within the minor version is ok so i’d be surprised but it’s worth trying.
j
ah was cloudpickle + user error on path of what was in the image vs on host
thanks for helping!
k
Ah ok. Nice!