Emma Rizzi
01/18/2022, 9:56 AMFailed to load and execute Flow's environment: FlowStorageError("An error occurred while unpickling the flow:\n TypeError('an integer is required (got type bytes)')\nThis may be due to one of the following version mismatches between the flow build and execution environments:\n - prefect: (flow built with '0.15.10', currently running with '0.15.12')\n - python: (flow built with '3.7.11', currently running with '3.9.9')")
?
I search this slack for insights, I use prefect Cloud with a docker agent on a VM, I upgraded prefect to 0.15.12 on both agent and development machineAnna Geller
Emma Rizzi
01/18/2022, 10:23 AMstored_as_script=True
in our Docker storage but it says that path
is required according to the documentation, how do we find the default location of the flow ?Anna Geller
Anna Geller
stored_as_script
= True
• path
must point to the path in the image
• if this path is different than /opt/prefect/flows/YOUR_FLOW.py, then you also need to change the default prefect_directory
to your custom directory
• you need to add the flow to the storage explicitly before registering, e.g.: docker_storage.add_flow(flow)
• finally, registering the flow must happen from Python, since the prefect register
CLI doesn’t have the option to pass build=False, and this is critical to include to prevent pickling flow and rebuilding the image on registration
• the parameter ignore_healthchecks
on the Docker storage is optional and doesn’t affect this process at allEmma Rizzi
01/19/2022, 2:21 PMignore_healthchecks=True
(which was weird as it worked for another flow, i suppose it depends on the versions...)Anna Geller