'set' object has no attribute 'openapi_types'
What happened (please include outputs or screenshots):
When running the following test code;
body=k8s.client.V1PersistentVolumeClaim(metadata=k8s.client.V1ObjectMeta(
name="%s-%s" % ("username","test_name")
),
spec=k8s.client.V1PersistentVolumeClaimSpec(
volume_mode="Filesystem",
access_modes=["ReadWriteOnce"],
storage_class_name="build-pvc",
resources=k8s.client.V1ResourceRequirements(
requests={"storage","1Gi"}
)
)
)
try:
api_response=k8s_client.create_namespaced_persistent_volume_claim("testnamespace",body,pretty=True)
except Exception as e:
return HttpResponse("ERROR Calling Kubernetes API: %s" % e)
I get the response
'set' object has no attribute 'openapi_types'
What you expected to happen:
PVC is created as named in the givennamespace
How to reproduce it (as minimally and precisely as possible):
Code provided above.
Anything else we need to know?:
Environment:
- Kubernetes version (
kubectl version): 1.25.16 - OS (e.g., MacOS 10.13.6): linux / ubuntu 20.02
- Python version (
python --version) 3.1.0.12 - Python client version (
pip list | grep kubernetes) 25.3.0
problem also occurs with 29. version.
@mattjwarren Could you follow one of the examples to perform a creation? https://github.com/kubernetes-client/python/tree/master/examples I wonder if the issue is happening to other types as well, or just PVC?
Hi, just noted your response; I will follow up and post results here
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle rotten - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Reopen this issue with
/reopen - Mark this issue as fresh with
/remove-lifecycle rotten - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied- After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied- After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closedYou can:
- Reopen this issue with
/reopen- Mark this issue as fresh with
/remove-lifecycle rotten- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.