<@ULVA73B9P> I just changed my flow from being syn...
# marvin-in-the-wild
d
@Marvin I just changed my flow from being synchronous to asynchronous (now defined as
async def flow():
and now I am receiving the
Could not find flow
error when attempting to deploy. Is this a known issue or could I be doing something wrong? If I change the function back to
def flow():
without the
async
prefix, it deploys with no problem.
m
It seems there is no direct mention of the precise issue you're experiencing with asynchronous (
async def flow()
) deployment and the error "Could not find flow." Here are a few pointers and potential causes: 1. Possible Issue with Event Loop: One related GitHub issue discusses problems with different event loops in Kubernetes (#13181). This suggests that some asynchronous operations may have unique challenges in certain deployments. 2. Synchronous vs. Asynchronous Context: There may be context mismatch issues when an asynchronous function is used where a synchronous function was expected. 3. Flow Definition Structure: Ensure your flow and tasks are decorated correctly and check for any syntax-specific requirements for defining asynchronous flows in Prefect. ### Troubleshooting Steps: 1. Simplified Flow: Test a minimal asynchronous flow to see if the issue persists. 2. Documentation Check: Review the latest Prefect documentation to confirm the proper way to define and deploy asynchronous flows. 3. Logs and Error Details: Check the full stack trace or logs for more details that could provide a clue. If the issue remains unresolved, it might be beneficial to submit a bug report or seek support on the Prefect Discourse with specifics about your deployment environment and flow definition. Would you like to see a code example of an asynchronous flow to compare with your implementation?