Hi All, I'm trying to run a flow using LocalDaskEx...
# prefect-community
n
Hi All, I'm trying to run a flow using LocalDaskExecutor (using LocalDaskExecutor()), but I get an error: 'signal only works in main thread'. I was wondering if anyone knows what the problem could be. I get similar issues with DaskExecutor also. I'm running prefect==0.14.5, dask==2021.1.1, distributed==2020.12.0 Thank you
👀 1
z
Hi @Nikul, can you try putting your flow run/registration in a
if __name__ == "__main__"
block?
n
I still get the same error: 2021-02-11 172037+0000] ERROR - prefect.TaskRunner | Unexpected error: ValueError('signal only works in main thread')
z
Can you share your code so i can take a look?
n
The flow is essentially this:
Copy code
with Flow('f') as flow:
  result1 = task1()
    result2 = task2()

    result3=task3(result1, result2)

flow.executor = LocalDaskExecutor()

if _name_ == "_main_":
    flow.run()
z
Can you also share the full traceback from the error?