Hello, I am trying to run a flow (A) on a local pr...
# prefect-server
j
Hello, I am trying to run a flow (A) on a local prefect server but I am running into the following error:
Copy code
Failed to load and execute Flow's environment: StorageError('An error occurred while unpickling the flow:\n  ModuleNotFoundError("No module named \'subpackage1\'")\nThis may be due to a missing Python module in your current environment. Please ensure you have all required flow dependencies installed.')
I'm trying to import package 1 and 2 in flow A . I get that the Prefect environment can't find the module but what is they best way of solving this? folder structure: └── myproject └── system1 ├── flow_A.py └── subpackage1 └── package1.py └── subpackage2 └── package2.py └── random files (that I can import)
k
Hey @Jonas, if you are running the agent on the same machine with it, you can either start the agent in the directory that has access to these or you can set
LocalRun(working_dir="…")
and the imports would work. Or you could
pip install -e .
the project on the machine and that might resolve the imports.
If you are running this on a different machine, then you have to package this with Docker.