python icon indicating copy to clipboard operation
python copied to clipboard

SSL Error

Open ianubhav opened this issue 9 years ago • 6 comments

I have installed kubectl and minikube and able to run them directly on console

But running this

ret = v1.list_pod_for_all_namespaces(watch=False)

ApiException: (0) Reason: SSLError [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645)

gives an SSL error

ianubhav avatar Mar 07 '17 05:03 ianubhav

Can you also give your setup detail? If I have to guess, I say you are on mac and your OPENSSL_VERSION is less than 1.0.0. Run this command:

python -c "import ssl; print ssl.OPENSSL_VERSION"

mbohlool avatar Mar 07 '17 18:03 mbohlool

Yes thats exactly correct.

ianubhav avatar Mar 07 '17 18:03 ianubhav

I am having the same problems, I ran that command that python command and got openSSL 1.0.2k 26 Jan 2017. does it need to be a specific version? I am on a OSX system

gardlt avatar Mar 07 '17 20:03 gardlt

No, it should work. Can you share your code snippet and the exact error? Also did you try kubectl to make sure the same command works there?

mbohlool avatar Mar 07 '17 21:03 mbohlool

I also have the same problem. And solve by reinstall openssl and python.

 brew update
 brew install openssl
 brew install python

then use new python in virtualenv

virtualenv -p /usr/local/Cellar/python/2.7.13/bin/python ~/.venv

xsren avatar Jul 05 '17 06:07 xsren

This is due to the recent TLS support deprecation by Python.org sites. Just install pip using curl (See this post: https://stackoverflow.com/a/49769015/1526703)

gitanupam avatar Apr 25 '18 04:04 gitanupam