I was using Python’s Requests module at a recent client engagement. I and ran into this error:
requests/packages/urllib3/util/ssl_.py:100: 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. |
What worked for me was to do this:
pip install requests[security] |
To add this to your requirements.txt on GitHub
requests[security]==2.8.1 |
I typed this up because I noticed there are a few of other workarounds listed on the Internet – including upgrading your Python version (recommended if possible), installing PyOpenSSL and even downgrading(?!) your Requests version to suppress the warning.
I want to find out what conditions produce remarkable software. A few years ago, I chose to work as the first professional tester at a startup. I successfully won credibility for testers and established a world-class team. I have lead the testing for early versions of multiple products. Today, I run Qxf2 Services. Qxf2 provides software testing services for startups. If you are interested in what Qxf2 offers or simply want to talk about testing, you can contact me at: [email protected]. I like testing, math, chess and dogs.