You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
response_types_map not treated as an optional argument #310
File "<snip>/kubernetes_asyncio/client/api_client.py", Line 201, in __call_api
response_type = response_types_map.get(response_data.status, None)
AttributeError: 'NoneType' object has no attribute 'get'
Explanation
The method call_api takes an optional argument response_types_map: def call_api(self, resource_path, ..., response_types_map=None, ...)
Sorry it took me so long to respond. I was working on some code where the use-case was to periodically send commands to kubernetes, but we wanted to check that the kubernetes cluster was ready first. Kubernetes exposes this through the readyz endpoint. Since there's no dedicated method for doing this in the kubernetes client, the next best solution was to use the call_api method.
Activity
tomplus commentedon Apr 23, 2024
Thanks, definitely it's worth to fix it 👍
But I'm curious what's your use case, because usually this method is not called directly?
ndhansen commentedon May 4, 2024
Sorry it took me so long to respond. I was working on some code where the use-case was to periodically send commands to kubernetes, but we wanted to check that the kubernetes cluster was ready first. Kubernetes exposes this through the
readyzendpoint. Since there's no dedicated method for doing this in the kubernetes client, the next best solution was to use thecall_apimethod.tomplus commentedon May 5, 2024
Fair enough, thanks.