I'm getting a weird error even though my flow exis...
# prefect-community
a
I'm getting a weird error even though my flow exists
Copy code
prefect.exceptions.MissingFlowError: Flow 'tool' not found in script 'flows/tool.py'. Found the following flows: 'monolithic-tool-flow'. Check to make sure that your flow function is decorated with `@flow`.
I have the flow defined as
Copy code
flows/tool.py
-------
@flow(name="monolithic-tool-flow")
def process_tool()...
and deploy like
Copy code
prefect deployment build flows/tool.py:process_tool -n process_tool  -q test -ib docker-container/local --override image=sha256:4e3346168cs3a3c6c0fb256d6e705c6629a41f0f6f23405c33a0bbc3deb964690   --apply
1
Deployment works. Running does not
I'm packaging my flow with docker. This was working yesterday
Weirdly, renaming the flow worked.
m
I think this might be related to the 2.7.2 release. I just updated my images and I'm getting these errors as well
Copy code
prefect.exceptions.MissingFlowError: Flow 'opsjira_extract_flow' not found in script 'flows/opsjira_extract_flow.py'. Found the following flows: 'dbt-cli-command' 'opsjira-extract-flow'. Check to make sure that your flow function is decorated with `@flow`.
I'm guessing it has to do with the changes introduced in this PR: https://github.com/PrefectHQ/prefect/pull/7817 I reverted back to 2.7.1 on my flow run images, and things are back to normal.
gratitude thank you 1
r
I am seeing the same issue with 2.7.2
1
its seems that flow name with underscore in the function name do not work, as deployment build command tries to find the flow with dashed case instead of underscores
gratitude thank you 1
my_flow
throws an error saying throws an error
Copy code
Flow 'my_flow' not found in script 'flow/flow.py'. Found the following flows: 'my-flow'. Check to make sure that your flow function is decorated with `@flow`.
but
myflow
worked
a
thanks everyone for reporting, I was able to reproduce and opened a ticket, we'll fix that asap https://github.com/PrefectHQ/prefect/issues/7918
ofc it had to be the line 42 that causes the issue 42
42 2
🤣 1
p
❤️ 1
gratitude thank you 1