python network_error ai_generated partial

requests.exceptions.SSLError: HTTPSConnectionPool(host='incomplete.example.com', port=443): 超过最大重试次数 (由SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败:无法获取颁发者证书'))引起)

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

ID: python/requests-connectionerror-ssl-certificate-verify-failed-unable-to-get-issuer

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

版本兼容性

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

根因分析

服务器未发送中间CA证书,客户端无法构建信任链。

English

The server did not send the intermediate CA certificate, and the client cannot build the trust chain.

generic

解决方案

  1. 95% 成功率 Configure the server to send the full certificate chain
    Contact server administrator to include intermediate CA certificates in the server configuration.
  2. 85% 成功率 Provide the missing intermediate CA certificate locally
    requests.get('https://incomplete.example.com', verify='/path/to/intermediate-ca.crt')

无效尝试

常见但无效的做法:

  1. Disabling SSL verification 70% 失败

    Bypasses security; does not solve the missing intermediate certificate.

  2. Manually downloading the certificate and using it incorrectly 80% 失败

    If the certificate chain is incomplete, the verification still fails.