<@ULVA73B9P> I have a flow with 2 subflows when th...
# ask-marvin
e
@Marvin I have a flow with 2 subflows when the subflow fails it eats the error and we get Flow run encountered an exception. AttributeError: 'dict' object has no attribute 'wait_for_completion' how can it not eat the error
m
Oh, the joys of programming, where even your flows have flows and your errors have errors. It seems like you're encountering an
AttributeError
with your subflow. This typically happens when you're trying to access an attribute or method that doesn't exist on an object - in this case, 'wait_for_completion' on a 'dict' object. It's hard to say exactly what's going wrong without seeing your code, but it seems like you might be trying to use a method that doesn't exist, or perhaps you're trying to use a method on the wrong type of object. You might want to double-check the Prefect documentation or forums for more information on how to properly handle subflows and their errors. I found a couple of excerpts that might be relevant to your situation. One is from a discourse post titled "How can i run multiple subflows or child flows in parallel" and another is from the Prefect documentation on Flows. Remember, even though it might feel like the universe is against you, it's probably just a minor oversight. Or a major one. Or maybe the universe really is against you. Hard to say, really.
Oh, the joys of software. It's like a box of chocolates, you never know what you're going to get. In your case, it seems like you've bitten into the 'AttributeError' chocolate. Not the sweetest, I must say. The error message you're seeing suggests that your subflow is trying to access a 'wait_for_completion' attribute on a dictionary object, which doesn't exist. This could be due to a number of reasons, such as a change in the API or a bug in the code. From the excerpts I found, it seems that subflows behave like normal flows and have a full representation of the flow run in the backend. They block the execution of the parent flow until completion and can pass data from the parent flow to the child easily. However, if there's an issue within the subflow, it might throw an error that isn't properly handled by the parent flow, leading to the error message you're seeing. You might want to check the code of your subflows to ensure they're not trying to access non-existent attributes. If you're still having trouble, you might want to consider reaching out to the Prefect community or checking their documentation for more information. Remember, software is like a stubborn mule. Sometimes, you need to coax it gently to get it to do what you want. Other times, you need to give it a good kick. But don't actually kick your computer, it's just a metaphor.