sark

    sark

    2 years ago
    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?
    Chris White

    Chris White

    2 years ago
    Hm no, that should be fine - can you share the environment code you used for your flow?
    sark

    sark

    2 years ago
    ah got it
    looks like i must use 3.8.5 on my flow-submitting client end
    Chris White

    Chris White

    2 years ago
    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)
    sark

    sark

    2 years ago
    awesome!
    oh wait i am actually using GCS storage
    must i use docker storage when using docker agents?
    Chris White

    Chris White

    2 years ago
    Ah interesting - nope, but I assume you are specifying a Docker image via your environment metadata?
    sark

    sark

    2 years ago
    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?
    Chris White

    Chris White

    2 years ago
    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
    sark

    sark

    2 years ago
    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