有一个用python requests的脚本之前一直运行良好,大概是安装了qqbot之后,出现的问题,qqbot会安装以下包:
Successfully installed apscheduler-3.3.1 certifi-2017.7.27.1 pytz-2017.2 qqbot-2.3.5 six-1.10.0 tzlocal-1.4
之后脚本就开始报错了
requests.exceptions.SSLError: HTTPSConnectionPool(host='qyapi.weixin.qq.com', port=443): Max retries exceeded with url: /cgi-bin/media/upload?access_token=-----&type=image (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)'),))
请教是什么原因?如何解决?
估计是安装了 certifi-2017.7.27.1 根证书集 导致的。可以卸载试试。
这个问题也许与python版本有关系,可以换个版本试试。
或者可以把 ssl 证书验证禁用。类似: