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
async with ApiClient() as api_client:
custom_object = CustomObjectsApi(api_client)
return await custom_object.patch_namespaced_custom_object(
group=API_GROUP,
version=VERSION,
plural=RESOURCE,
name=name,
namespace=namespace,
body=patch,
)
in kubernetes official python library
with ApiClient() as api_client:
custom_object = CustomObjectsApi(api_client)
return custom_object.patch_namespaced_custom_object(
group=API_GROUP,
version=VERSION,
plural=RESOURCE,
name=name,
namespace=namespace,
body=patch,
)
expect the same behavior, but get an error on kubernetes_asyncio.
error
File "/opt/conda/lib/python3.8/site-packages/kubernetes_asyncio/client/api_client.py", line 189, in __call_api
raise e
File "/opt/conda/lib/python3.8/site-packages/kubernetes_asyncio/client/api_client.py", line 182, in __call_api
response_data = await self.request(
File "/opt/conda/lib/python3.8/site-packages/kubernetes_asyncio/client/rest.py", line 258, in PATCH
return (await self.request("PATCH", url,
File "/opt/conda/lib/python3.8/site-packages/kubernetes_asyncio/client/rest.py", line 194, in request
raise ApiException(http_resp=r)
kubernetes_asyncio.client.exceptions.ApiException: (415)
Reason: Unsupported Media Type
HTTP response headers: <CIMultiDictProxy('Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'Date': 'Fri, 03 Sep 2021 11:16:55 GMT', 'Content-Length': '293')>
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"the body of the request was in an unknown format - accepted media types include: application/json-patch+json, application/merge-patch+json, application/apply-patch+yaml","reason":"UnsupportedMediaType","code":415}
Is this a version compatibility issue with kubernetes?
The text was updated successfully, but these errors were encountered:
kubernetes version: 1.18.5
kubernetes_asyncio version: lastest
in kubernetes_asyncio
in kubernetes official python library
expect the same behavior, but get an error on kubernetes_asyncio.
error
Is this a version compatibility issue with kubernetes?
The text was updated successfully, but these errors were encountered: