0
votes

Python version: 2.6.6

/usr/lib/python2.6/site-packages/requests/packages/urllib3/util/ssl_.py:79: 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

Code:

api.update_status(status=myVar)

I imagine I need to downgrade something, just not sure what it is.

Tweepy was just installed to my Python 2.6.6 via pip.

2

2 Answers

0
votes

I don't know what OS you're using, I'm using a Mac so hopefully this works for you.

If you are trying to update your pip to 6.1.1 you have to upgrade Python 2.7.9 because the certification is bundled together. You can see this in the README documentation for Python 2.7.9: "The bundled pip included with 2.7.9 has its own default certificate store for verifying download connections"

It also says that the 0.9.7 version of the OpenSSL library is out of date, so if you download a new version of python you have to make sure the version of OpenSSL it is linked to is up to date. Right now it should be the 10.5+ 32-bit variant and it is linked with a private copy of OpenSSL 1.0.1

After you've downloaded that try installing pip. I had permission issues so I had to use sudo to install using: sudo pip install --upgrade pip

If that doesn't work you can try upgrading your setup tools: pip install --upgrade --no-use-wheel setuptools or pip install --upgrade setuptools

Then you will need to upgrade Python: pip install --upgrade python

If you need help with pip commands use: pip2.7 --help

After that you can double check to make sure the correct versions are installed using: pip --version and python --version.

I hope that helps!

0
votes

I had this problem just then, but from the link given:

InsecurePlatformWarning

New in version 1.11.

Certain Python platforms (specifically, versions of Python earlier than 2.7.9) have restrictions in their ssl module that limit the configuration that urllib3 can apply. In particular, this can cause HTTPS requests that would succeed on more featureful platforms to fail, and can cause certain security features to be unavailable.

Updating from 2.7.6 to 2.7.9 fixed the warning.