python network_error ai_generated partial

requests.exceptions.SSLError: HTTPSConnectionPool(host='expired.example.com', port=443): 超过最大重试次数 (由SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败:证书已过期'))引起)

requests.exceptions.SSLError: HTTPSConnectionPool(host='expired.example.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired')))

ID: python/requests-sslerror-expired-certificate

其他格式: JSON · Markdown 中文 · English
80%修复率
86%置信度
0证据数
2025-03-05首次发现

版本兼容性

版本状态引入弃用备注
3.x active

根因分析

服务器的SSL证书已过期,不再有效。

English

The server's SSL certificate has expired and is no longer valid.

generic

解决方案

  1. 95% 成功率 Renew the certificate on the server side
    Contact server administrator to renew the SSL certificate.
  2. 80% 成功率 Use a different endpoint or service that has a valid certificate
    requests.get('https://valid.example.com')

无效尝试

常见但无效的做法:

  1. Setting verify=False to bypass the error 60% 失败

    Bypasses security but exposes to risks; does not fix the expired certificate.

  2. Using a custom CA bundle with the expired certificate 90% 失败

    The certificate is expired, so it will still fail verification.