Reputation: 43
I get the following error:
TypeError: object list can't be used in 'await' expression
when I try to await futures as dask_client.gather(futures)
or await futures
.
I am using a Dask Client with asynchronous=True
Tried referring to the official docs https://distributed.dask.org/en/stable/asynchronous.html
Upvotes: 1
Views: 178
Reputation: 43
Adding asynchronous=True
while initialising the dask client is not enough when you want to gather or wait for all futures to finish executing. asynchronous=True
argument has to be passed to the gather method as well.
await dask_client.gather(futures, asynchronous=True)
Upvotes: 3