小编Luk*_*ham的帖子

使用Requests包时出现SSL InsecurePlatform错误

我使用Python 2.7.3和请求.我通过pip安装了Requests.我相信这是最新版本.我正在使用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.
Run Code Online (Sandbox Code Playgroud)

关于为什么我得到这个的任何想法?我已经检查了错误消息中指定的文档,但文档说要导入urllib3并禁用警告或提供证书.

python ssl python-requests

234
推荐指数
6
解决办法
18万
查看次数

标签 统计

python ×1

python-requests ×1

ssl ×1