Hi! I’m trying to run a flow locally with a prefec...
# ask-community
s
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
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
That’s weird. I’m not really passing or returning anything from any task. Does this include function calls within the task too?
k
No it does not. A good way to test is to do
cloudpickle.dumps()
on the output of the function