{"id":3316,"date":"2015-10-23T05:31:56","date_gmt":"2015-10-23T09:31:56","guid":{"rendered":"http:\/\/qxf2.com\/blog\/?p=3316"},"modified":"2015-10-23T05:31:01","modified_gmt":"2015-10-23T09:31:01","slug":"insecureplatformwarning-true-sslcontext-object-not-available","status":"publish","type":"post","link":"https:\/\/qxf2.com\/blog\/insecureplatformwarning-true-sslcontext-object-not-available\/","title":{"rendered":"InsecurePlatformWarning: A true SSLContext object is not available"},"content":{"rendered":"<p>I was using Python&#8217;s Requests module at a recent client engagement. I and ran into this error:<\/p>\n<pre lang=\"bash\">\r\nrequests\/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.\r\n<\/pre>\n<p>What worked for me was to do this:<\/p>\n<pre lang=\"bash\">\r\npip install requests[security]\r\n<\/pre>\n<p>To add this to your requirements.txt on GitHub<\/p>\n<pre lang=\"bash\">\r\nrequests[security]==2.8.1\r\n<\/pre>\n<p>I typed this up because I noticed there are a few of other workarounds listed on the Internet &#8211; including upgrading your Python version (recommended if possible), installing PyOpenSSL and even downgrading(?!) your Requests version to suppress the warning. <\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>I was using Python&#8217;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-3316","post","type-post","status-publish","format-standard","hentry","category-python"],"_links":{"self":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts\/3316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/comments?post=3316"}],"version-history":[{"count":4,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts\/3316\/revisions"}],"predecessor-version":[{"id":3320,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts\/3316\/revisions\/3320"}],"wp:attachment":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/media?parent=3316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/categories?post=3316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/tags?post=3316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}