Mark Dodds

02/28/2021, 5:27 PM
I have a prefect agent running inside a docker container that connects to the prefect cloud server. When i initially register flows to run on this agent they execute fine, but if I update the task/flow logic (without changing the method signature - ie. just adding more logging statements), rebuild the container, and execute the flow I get an error
Failed to load and execute Flow's environment
. This is the full error
Failed to load and execute Flow's environment: ModuleNotFoundError("No module named '/root/'")
This happens every time I update the flow regardless of what changes are actually made. I'm guessing I'm doing to setup or storage wrong but not really sure where to start - any direction would be much appreciated!


03/01/2021, 1:07 AM
Hi @Mark Dodds! Could you share your Flow’s Run Config and Storage code, along with your Agent info?
(Any config you do when you start your agent, etc)

Mark Dodds

03/01/2021, 2:37 AM
Thanks for the reply - I actually solved it. Turns out when I changed the code it rebuilt the container and I was using LocalStorage so the flows got wiped out each time.