Any idea how I can progress with: ```Failed to loa...
# ask-community
c
Any idea how I can progress with:
Copy code
Failed to load and execute Flow's environment: StorageError("An error occurred while unpickling the flow:\n  TypeError('code() takes at most 15 arguments (16 given)')\nThis may be due to one of the following version mismatches between the flow build and execution environments:\n  - python: (flow built with '3.8.6', currently running with '3.7.10')")
? For background I'm using an ECS Agent.
j
What agent image are you using?
c
prefecthq/prefect:0.14.13-python3.8
is the image we're running on ECS
j
Definitely? That seems to suggest you built and registered with 3.8 but that the agent is actually runing 3.7
I saw a similar error and I was defo using the wrong python version
So if your not then no bloody idea
c
Well. The agent is definitely that image, as I'm telling CDK to deploy that image
I dont know what image it then uses to spawn flows
prefecthq/prefect:0.14.13
looks like this one
Hmmm I wonder how I change that.
j
I assume you use ECSrun?
That has an arg image so probably there?
Or I imagine as part of the task_def that gets passed in?
c
We were just using Universal Run
But we might have to use ECSRun now...
Thanks for the call @Josh Greenhalgh - Changing to ECSRun and pinning the image to
prefecthq/prefect:0.14.13-python3.8
did the job 🦜
j
By default, the agent will use the default
prefecthq/prefect
image that corresponds with the prefect release your flow was registered with. Currently this is a python 3.7 image (though we should update that to 3.8). If you manually specify an image to use, or use script based storage (https://docs.prefect.io/orchestration/flow_config/storage.html#script-based-storage)) you won't have this issue.
c
Cool, thanks folks!