There is one time I see this kind of error:

          InsecurePlatformWarning: A true SSLContext object is not available. 
This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail.
For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning

If you’re on Ubuntu, you may run into trouble installing pyopenssl, so you’ll need these dependencies:

apt-get install libffi-dev libssl-dev

Then you’ll only need to install the security package extras:

pip install requests[security]

or, install them directly via pip:

pip install pyopenssl ndg-httpsclient pyasn1

Requests package/library will then automatically inject pyopenssl into urllib3

Credit:
http://stackoverflow.com/questions/29134512/insecureplatformwarning-a-true-sslcontext-object-is-not-available-this-prevent

By zam

Any Comments?

This site uses Akismet to reduce spam. Learn how your comment data is processed.