python
network_error
ai_generated
partial
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
80%Fix Rate
86%Confidence
0Evidence
2025-03-05First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.x | active | — | — | — |
Root Cause
The server's SSL certificate has expired and is no longer valid.
generic中文
服务器的SSL证书已过期,不再有效。
Workarounds
-
95% success Renew the certificate on the server side
Contact server administrator to renew the SSL certificate.
-
80% success Use a different endpoint or service that has a valid certificate
requests.get('https://valid.example.com')
Dead Ends
Common approaches that don't work:
-
Setting verify=False to bypass the error
60% fail
Bypasses security but exposes to risks; does not fix the expired certificate.
-
Using a custom CA bundle with the expired certificate
90% fail
The certificate is expired, so it will still fail verification.