• 周日. 10 月 6th, 2024

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

python requires模块 https请求 由于TLS协议版本太高导致错误

admin

11 月 28, 2021

错误提示

requests.exceptions.SSLError: HTTPSConnectionPool(host='air.cnemc.cn', port=18007): Max retries exceeded with url: /emcpublish/ClientBin/Env-CnemcPublish-RiaServices-EnvCnemcPublishDomainService.svc/binary/GetAQIDataPublishLives (Caused by SSLError(SSLError(1, '[SSL: UNSUPPORTED_PROTOCOL] unsupported protocol (_ssl.c:897)'),))

  

解决办法:

centos系统中

vim /etc/crypto-policies/back-ends/opensslcnf.config

MinProtocol = TLSv1.2

修改为

MinProtocol = TLSv1.0

完美解决.

发表回复