Elliot Oram
10/09/2020, 3:35 PMwith Flow("Flow name") as flow:
flow.add_task(abc)
flow.register(project_name="Test")
In the latest version I find that this isn't possible anymore as I get a TypeError: can't pickle generator objects
My solution has been to replace this by defining the the flow object directly and ditching the context manager e.g.
flow = Flow("Flow name")
flow.add_task(abc)
flow.register(project_name="Test")
This works absolutely fine and I'm happy to continue with it. I just wanted to check if:
1. This is the expected / best way to resolve this problem
2. [Some of the documentation](https://docs.prefect.io/core/concepts/tasks.html#overview) still refers to the use of the context manager style. Is this okay to do simply because tese example do not register a flow?
Any advice is welcome ๐ Thanks!Chris White
10/09/2020, 3:36 PMwith Flow("Flow name") as flow:
flow.add_task(abc)
flow.register(project_name="Test")
ale
10/09/2020, 3:40 PMElliot Oram
10/09/2020, 3:41 PMJim Crist-Harif
10/09/2020, 3:41 PMale
10/09/2020, 3:45 PMJim Crist-Harif
10/09/2020, 4:49 PM