list_api_service: ValueError: Invalid value for `service`, must not be `None`
See original GitHub issueHello, I try to get apiservice using in python doing:
config.load_kube_config(kubectl_config_full_path)
api_instance = client.ApiregistrationV1Api()
response = api_instance.list_api_service()
print("Api services: " + str(response))
but I get the following error:
ValueError: Invalid value for service
, must not be None
I have a AWS EKS 1.15 as Kubernetes Master. Python 3.6.8. python kubernetes client 10.0.0 Ubuntu 16.04.6 LTS
Update: I’ve tested it with python kubernetes client 11.0.0 and I get the same error
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
ValueError: Invalid value for selector, must not be None
It's because they changed the validation to happen in the constructor, rather that later -- which is not what the notebook was expecting....
Read more >Python kubernetes library equivalent of `kubectl get node
I'm running into this same issue and I don't know how to get around it. What worked for you ApproximateIdentity?
Read more >Bug #1905481 “Python Kubernetes client raises exception ...
In sysinv log, the error "Kubernetes exception in kube_get_nodes: Invalid value for `names`, must not be `None`" appears every minute.
Read more >kfp.dsl._container_op — Kubeflow Pipelines documentation
NOTE: A notable difference is that `name` is not required and will not be processed for ... size_string) is None: raise ValueError( 'Invalid...
Read more >ValueError: Invalid value for selector, must not be None
Starting with intro_notebook.ipynb at 3rd step I get an error: ValueError: Invalid value for `selector`, must not be `None`. Here is the code:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Looks like this is another occurrence of https://github.com/kubernetes-client/gen/issues/52 and has been fixed by https://github.com/kubernetes/kubernetes/pull/85728 in Kubernetes 1.18. Kubernetes sometimes incorrectly restricts a field to be required but the apiserver may omits the field in real responses. These responses break the generated clients since the generated client-side validation expects the required field to exist.
For now the workaround is either to avoid de-serializing the response so the client-side validation doesn’t kick in, or to remove the client-side validation if you have access to your local module code. Once we cut a new release with the 1.18 openapi spec, the generated client won’t expect the field to be required.
@MoShitrit thanks for the workaround, it fits ok for me. Regards.