https://prefect.io logo
#random
Title
o

Olivér Atanaszov

02/10/2022, 4:57 PM
Hi, I'm trying to use GCS storage with pickling my flow, but I get:
Failed to load and execute Flow's environment: FlowStorageError('An error occurred while unpickling the flow:\n ModuleNotFoundError("No module named \'utils\'")\nThis may be due to a missing Python module in your current environment. Please ensure you have all required flow dependencies installed.')
In my flow definition, I'm trying to import from this package called
utils
but apparently cloudpickle did not take care of these imports. I've checked this guide but couldn't figure the canonical way of composing flows using imports from other packages/modules: https://docs.prefect.io/orchestration/flow_config/storage.html#pickle-vs-script-based-storage
k

Kevin Kho

02/10/2022, 5:02 PM
Script based storage just keeps the file. You’d either need to package it in Docker storage or have it installed on the execution side
o

Olivér Atanaszov

02/10/2022, 5:18 PM
Thanks! do you have any sort of documentation on how to package my packages/modules using Docker storage?
o

Olivér Atanaszov

02/10/2022, 5:21 PM
thanks Kevin!
22 Views