Hello community,
I deployed Dask-Hub and Dask-Operator on kubernetes. I created a daskcluster crd (via kubectl) but, I can’t ceate a Daskcluster via Gateway:
Exception ignored in: <function Gateway.__del__ at 0x7f4170716980>
Traceback (most recent call last):
File "/srv/conda/envs/notebook/lib/python3.11/site-packages/dask_gateway/client.py", line 380, in __del__
self.close()
File "/srv/conda/envs/notebook/lib/python3.11/site-packages/dask_gateway/client.py", line 353, in close
elif self.loop.asyncio_loop.is_running():
^^^^^^^^^
File "/srv/conda/envs/notebook/lib/python3.11/site-packages/dask_gateway/client.py", line 330, in loop
return self._loop_runner.loop
^^^^^^^^^^^^^^^^^^^^^^
File "/srv/conda/envs/notebook/lib/python3.11/site-packages/distributed/utils.py", line 652, in loop
)
RuntimeError: Accessing the loop property while the loop is not running is not supported
Thanks for the reply Here’s the full instructions, I just started tried to create a cluster using the dask-gw and problem happen when I invoked new_cluster().
Full code:
from dask_gateway import GatewayCluster
cluster = GatewayCluster()
from dask_gateway import Gateway
gateway = Gateway(
“http://-.us-west-2.elb.amazonaws.com/services/dask-gateway/”, auth=“jupyterhub”
)
gateway.list_clusters()
Exception ignored in: <function Gateway.__del__ at 0x7f9a960928e0>
Traceback (most recent call last):
File "/srv/conda/envs/notebook/lib/python3.11/site-packages/dask_gateway/client.py", line 380, in __del__
self.close()
File "/srv/conda/envs/notebook/lib/python3.11/site-packages/dask_gateway/client.py", line 353, in close
elif self.loop.asyncio_loop.is_running():
^^^^^^^^^
File "/srv/conda/envs/notebook/lib/python3.11/site-packages/dask_gateway/client.py", line 330, in loop
return self._loop_runner.loop
^^^^^^^^^^^^^^^^^^^^^^
File "/srv/conda/envs/notebook/lib/python3.11/site-packages/distributed/utils.py", line 652, in loop
raise RuntimeError(
RuntimeError: Accessing the loop property while the loop is not running is not supported
This first invocation creates a cluster instance not tied to any gateway (you didn’t connect to the gateway yet). You then reassign the cluster variable, causing this original cluster to be cleaned up - which fails because it doesn’t exist/wasn’t started.