pypa/pip · error · SSLMissingError
ssl-missing
ssl-missing
Error message
Failed to establish a secure connection for {url} What it means
Error "Failed to establish a secure connection for {url}" thrown in pypa/pip.
Source
Thrown at src/pip/_internal/network/session.py:531
def request(self, method: str, url: str, *args: Any, **kwargs: Any) -> Response: # type: ignore[override]
# Allow setting a default timeout on a session
kwargs.setdefault("timeout", self.timeout)
# Allow setting a default proxies on a session
kwargs.setdefault("proxies", self.proxies)
# Dispatch the actual request
try:
return super().request(method, url, *args, **kwargs)
except (requests.ConnectionError, requests.Timeout) as e:
request = getattr(e, "request", None)
failed_url = getattr(request, "url", None) or url
raise_connection_error(e, url=failed_url, timeout=kwargs["timeout"])
except ImportError as e:
if "ssl" in str(e).lower():
# Unfortunately, if this TLS error was the result of a redirect from
# a HTTP to a HTTPS url, we don't know what the final url was.
raise SSLMissingError(redact_auth_from_url(url))
raise
View on GitHub (pinned to d7d0d0a394)
When it happens
Trigger: Thrown at src/pip/_internal/network/session.py:531 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of pypa/pip@d7d0d0a394 (2026-08-04).
Data as JSON: /data/errors/05dc1acea9c2e012.json.
Report an issue: GitHub.