https://prefect.io logo
#prefect-community
Title
# prefect-community
s

Shriram Holla

05/27/2022, 2:23 PM
Hi! I’m trying to run a flow locally with a prefect server. I have the server running as well as a local agent. When I run
flow.run()
, it errors out with this message:
Copy code
TypeError: can't pickle _thread.lock objects
Note: I’m running the flow through a build system (bazel)
k

Kevin Kho

05/27/2022, 2:29 PM
You are likely returning something that cant be pickled from a task like a connection. If you use DaskExecutor, Dask passes things to workers by pickling them
s

Shriram Holla

05/27/2022, 2:43 PM
That’s weird. I’m not really passing or returning anything from any task. Does this include function calls within the task too?
k

Kevin Kho

05/27/2022, 2:51 PM
No it does not. A good way to test is to do
cloudpickle.dumps()
on the output of the function
5 Views