https://prefect.io logo
Title
s

sark

09/15/2020, 3:58 AM
so i got it to the serialisation to work with the LocalAgent but with a DockerAgent it gives
Failed to load and execute Flow's environment: TypeError('an integer is required (got type bytes)')
is it wrong to use
LocalEnvironment
with the docker agent?
c

Chris White

09/15/2020, 4:00 AM
Hm no, that should be fine - can you share the environment code you used for your flow?
s

sark

09/15/2020, 4:03 AM
ah got it
looks like i must use 3.8.5 on my flow-submitting client end
c

Chris White

09/15/2020, 4:04 AM
ah that makes sense - you can configure that in the Docker storage interface via the
python_version
kwarg (in this case, specifying 3.8 should be sufficient - the minor version usually has no impact)
s

sark

09/15/2020, 4:04 AM
awesome!
oh wait i am actually using GCS storage
must i use docker storage when using docker agents?
c

Chris White

09/15/2020, 4:09 AM
Ah interesting - nope, but I assume you are specifying a Docker image via your environment metadata?
s

sark

09/15/2020, 4:10 AM
ah i am currently trying to execute a non-docker flow with the docker agent
or must i keep at least 2 agents one for docker and one for non-docker?
c

Chris White

09/15/2020, 4:16 AM
Are you sure you aren’t specifying
metadata
on your Environment? The docker agent should raise an error if you don’t have a configured image for it to use. Either way, if you add
metadata={"image": "prefecthq/prefect:0.13.6-python3.8"}
to your Environment initialization (or some other appropriate image for your Flow that has all the necessary dependencies + the right version of python) you should be good
s

sark

09/15/2020, 4:17 AM
ah i was starting the agent with CLI
$ prefect agent start docker   -l dev -l docker -l gcs-flow-storage
btw it is working now when i match the python versions
💯 1