InsecurePlatformWarning

项目请求极光推送接口时出现InsecurePlatformWarning警告及证书不匹配错误。提示可升级Python版本解决,还给出解决方案,即在cmd中输入pip install pyopenssl ndg - httpsclient pyasn1。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

项目请求 极光推送接口 返回

 

/var/www/newymw3.1/venv/local/lib/python2.7/site-packages/urllib3/util/ssl_.py:160: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings

  InsecurePlatformWarning

ERROR:urllib3.connection:Certificate did not match expected hostname: bjapi.push.jiguang.cn. Certificate: {'notAfter': 'Jan  9 08:51:19 2021 GMT', 'subjectAltName': (('DNS', '*.jpush.cn'), ('DNS', 'jpush.cn')), 'subject': ((('countryName', u'CN'),), (('stateOrProvinceName', u'Guangdong'),), (('localityName', u'Shenzhen'),), (('organizationName', u'\u6df1\u5733\u5e02\u548c\u8baf\u534e\u8c37\u4fe1\u606f\u6280\u672f\u6709\u9650\u516c\u53f8'),), (('commonName', u'*.jpush.cn'),))}

 

解决方案:

  1. 在cmd中输入:
    pip install pyopenssl ndg-httpsclient pyasn1

链接地址

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值