-
-
Notifications
You must be signed in to change notification settings - Fork 153
'KubeCluster' object has no attribute '_lock' #247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @rajasgs, thanks for raising an issue. It'd be helpful to know what versions of dask, distributed, and dask-kubernetes you have installed. I see you are pip installing distributed master in the pod. That might result in a mismatch between the versions of distributed on the worker and in your work environment (where you run |
Hi - we saw the same that was caused by a ~/.kube/config file which was zero-length, giving 'None' as the config dict. A similar problem occurs if it is missing. It looks like KubeCluster will just carry on regardless with an invalid object if the config fails, so tornodo reports errors afterwards with _lock missing on the partially setup object:
|
Ah thanks for that @thatcr! I guess this issue can just be a case for better error handling in general. |
Ran into a similar issue and kubernetes-client/python-base#223 just got merged which should take care of the error. Now this will fail a bit more gracefully :) ---------------------------------------------------------------------------
ConfigException Traceback (most recent call last)
<ipython-input-1-a6aab33ba3f3> in <module>
6
----> 7 cluster = KubeCluster(pod_spec)
~/miniconda3/envs/dask/lib/python3.8/site-packages/dask_kubernetes/core.py in __init__(self, pod_template, name, namespace, n_workers, host, port, env, auth, idle_timeout, deploy_mode, interface, protocol, dashboard_address, security, scheduler_service_wait_timeout, scheduler_pod_template, **kwargs)
412 self.auth = auth
413 self.kwargs = kwargs
--> 414 super().__init__(**self.kwargs)
415
416 def _get_pod_template(self, pod_template, pod_type):
.....
.....
.....
~/dev/k8s/python/kubernetes/config/kube_config.py in load_config(self, path)
704
705 if config is None:
--> 706 raise ConfigException(
707 'Invalid kube-config. '
708 '%s file is empty' % path)
ConfigException: Invalid kube-config. /Users/ms/.kube/config file is empty |
Great! Thanks for mentioning that @MridulS |
Great thanks! Closing as fixed upstream. |
I am just testing dask-kubernetes.
Here is my code
When I the the above code on Jupyter lab, I get the error as bleow:
Not sure what I am doing here. Some help would be great.
The text was updated successfully, but these errors were encountered: