requests.exceptions.ProxyErrorWhat requests.exceptions.ProxyError Actually Means
requests raises ProxyError — a subclass of ConnectionError — when the proxied path itself cannot be established. The stack is requests wrapping urllib3, so the useful detail lives in the inner message. Three variants cover most cases: "Cannot connect to proxy" with a NameResolutionError or NewConnectionError means the proxy hostname or port is wrong, or the route is blocked; "Connection refused" or "Connection reset" means nothing is listening there or access was denied; and "Tunnel connection failed: 407" (or 403) means the proxy answered your CONNECT and rejected it — an authentication or permission problem, not connectivity.
The scope is the key insight: ProxyError is about the leg between you and the proxy. If the target site were down you would see ConnectTimeout or a plain ConnectionError without proxy wording. So the debugging surface is small and local: the proxy URL, the credentials, the proxies dict, and the environment variables that can silently override all three.
One near-neighbor to rule out: a socks5:// URL without the SOCKS extra installed raises InvalidSchema ("Missing dependencies for SOCKS support"), not ProxyError — same neighborhood, different fix.