requests库请求报SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
1 | [2019-04-18 14:14:46,594] ERROR in utils: Traceback (most recent call last): |
解决方法:
1
2pip uninstall -y certifi
pip install certifi推测可能是本地证书过期了,所以ssl验证失败导致的;
深挖一下发现certifi库也是requests项目组维护的,并且从requests项目中独立出来了,原文如下:
Certifi CA Bundle
Certifi is a carefully curated collection of Root Certificates for validating the trustworthiness of SSL certificates while verifying the identity of TLS hosts. It has been extracted from the Requests project.原文链接