关于requests.exceptions.SSLError: HTTPSConnectionPool(host='XXX', port=443)问题

在运行一下代码的时候,会进行报错

requests.exceptions.SSLError: HTTPSConnectionPool(host=‘XXX’, port=443)

解决方法如下:

1、先检查是否已安装requests的依赖安装包:

pip install cryptography

pip install pyOpenSSL

pip install certifi

2、如果已经安装依赖安装包,还会报错,则在请求后面加上verify=False就可以
关于requests.exceptions.SSLError: HTTPSConnectionPool(host='XXX', port=443)问题_第1张图片
3、如有这个报错
InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
则:
import urllib3
urllib3.disable_warnings()
就可以了

你可能感兴趣的:(关于requests.exceptions.SSLError: HTTPSConnectionPool(host='XXX', port=443)问题)