kubernetes-client / python

Official Python client library for kubernetes
http://kubernetes.io/
Apache License 2.0
6.83k stars 3.28k forks source link

11.0.0b1 fatal error - easy to reproduce #1008

Closed consideRatio closed 5 years ago

consideRatio commented 5 years ago

Version 11.0.0b1 release less than a day ago has a fatal bug that is very simple to reproduce.

GIF of error

import-error

To reproduce the error

pip install kubernetes==11.0.0b1
ipython
import kubernetes

Error logs

(base) ➜  kubespawner git:(master) ipython
Python 3.7.3 (default, Mar 27 2019, 22:11:17) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.6.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import kubernetes                                              
-----------------------------------------------------------------------
ModuleNotFoundError                   Traceback (most recent call last)
<ipython-input-1-bd7671d07f00> in <module>
----> 1 import kubernetes

~/anaconda3/lib/python3.7/site-packages/kubernetes/__init__.py in <module>
     17 __version__ = "11.0.0b1"
     18 
---> 19 import kubernetes.client
     20 import kubernetes.config
     21 import kubernetes.watch

~/anaconda3/lib/python3.7/site-packages/kubernetes/client/__init__.py in <module>
     18 
     19 # import apis into sdk package
---> 20 from kubernetes.client.api.admissionregistration_api import AdmissionregistrationApi
     21 from kubernetes.client.api.admissionregistration_v1beta1_api import AdmissionregistrationV1beta1Api
     22 from kubernetes.client.api.apiextensions_api import ApiextensionsApi

ModuleNotFoundError: No module named 'kubernetes.client.api'
toshitanian commented 5 years ago

Same error here.

jinchihe commented 5 years ago

This should be a P1 issue, any plan to fix this? Thanks @consideRatio

tomplus commented 5 years ago

Thanks for reporting this. I've prepare a patch to fix it and for now please use the latest stable release.

roycaihw commented 5 years ago

This is fixed in 11.0.0b2. Thanks for reporting and fixing this!