【发布时间】:2015-05-19 21:36:08
【问题描述】:
我正在使用 Python 2.7.3 和请求。我通过 pip 安装了请求。我相信这是最新版本。我在 Debian Wheezy 上运行。
我过去曾多次使用 Requests 并且从未遇到过这个问题,但似乎在使用 Requests 发出 https 请求时,我得到了 InsecurePlatform 异常。
错误提到urllib3,但我没有安装它。我确实安装了它以检查它是否解决了错误,但它没有。
/usr/local/lib/python2.7/dist-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.
关于我为什么会得到这个的任何想法?我检查了错误消息中指定的文档,但文档说要导入 urllib3 并禁用警告或提供证书。
【问题讨论】:
标签: python ssl python-requests