Hi there! Firstly, I'm sorry if this is a repeated question, but I have been banging my head against a wall for some time now.
We have Prefect Server deployed to a machine on our company cluster using docker. I have a flow (example.py) that runs on the same machine happily by running Prefect locally. I can start an agent in the directory of the script (or define the path to my script with -p) and register the flow. Flows are defined in ~/.prefect/flows/ (not where I am running the script nor the agent) and when registering the flow, it appears in the ui just fine. However, when I try to run the flow from within the ui, I get:
Failed to load and execute Flow's environment: ValueError('No flows found in file.')
Any ideas what I am doing wrong?
k
Kevin Kho
08/06/2021, 3:02 AM
Hey @Blake List, could you show me your RunConfig and Storage if you define any?
b
Blake List
08/19/2021, 7:11 AM
Hi @Kevin Kho
The flow is defined as:
with Flow('test-flow',
storage=Local(path="/path/to/test_flow.py",
stored_as_script=True,
add_default_labels=False)) as flow:
do_somthing()
Blake List
08/19/2021, 7:12 AM
I get the error:
Failed to load and execute Flow's environment: ModuleNotFoundError("No module named '/path/to/test_flow'")
k
Kevin Kho
08/19/2021, 12:30 PM
Are you running the flow from the same computer?
b
Blake List
08/19/2021, 11:37 PM
The (local) agent is started from a docker-compose which also binds the /home/user/.prefect/flows directory. The flow is ran from the same machine
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.