You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 696, in urlopen
self._prepare_proxy(conn)
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
conn.connect()
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/urllib3/connection.py", line 371, in connect
self._tunnel()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/http/client.py", line 902, in _tunnel
raise OSError("Tunnel connection failed: %d %s" % (code,
OSError: Tunnel connection failed: 407 Proxy Authentication Required
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/requests/adapters.py", line 440, in send
resp = conn.urlopen(
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='ifconfig.me', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/cheney/code/python/tools/test.py", line 17, in
res = requests.get("https://ifconfig.me", proxies=proxies)
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/requests/sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/requests/sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/requests/adapters.py", line 513, in send
raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='ifconfig.me', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required')))
Reproduction Steps
When using a proxy that requires basic authentication to access an HTTPS (not HTTP) address, the system gives an error. The code is as follows:
The text was updated successfully, but these errors were encountered:
ETOCheney
changed the title
MacOS cannot use a proxy with basic authentication to access HTTPS
MacOS cannot use a proxy with HTTP basic authentication to access HTTPS
Jan 6, 2022
Hi @ETOCheney, this is almost certainly a duplicate of #6027. This should be fixed in the latest release (2.27.1). I'm going to resolve this ticket for now, but please feel free to reopen if you find your issue persists after upgrading. Thanks!
Hi @ETOCheney, this is almost certainly a duplicate of #6027. This should be fixed in the latest release (2.27.1). I'm going to resolve this ticket for now, but please feel free to reopen if you find your issue persists after upgrading. Thanks!
I tried to upgrade to latest release(2.27.1) and found that the problem has been fixed. Thanks!
Expected Result
Displays the proxy IP address
Actual Result
Traceback (most recent call last):
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 696, in urlopen
self._prepare_proxy(conn)
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 964, in _prepare_proxy
conn.connect()
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/urllib3/connection.py", line 371, in connect
self._tunnel()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/http/client.py", line 902, in _tunnel
raise OSError("Tunnel connection failed: %d %s" % (code,
OSError: Tunnel connection failed: 407 Proxy Authentication Required
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/requests/adapters.py", line 440, in send
resp = conn.urlopen(
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='ifconfig.me', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/cheney/code/python/tools/test.py", line 17, in
res = requests.get("https://ifconfig.me", proxies=proxies)
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/requests/sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/requests/sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "/Users/cheney/code/python/tools/venv/lib/python3.8/site-packages/requests/adapters.py", line 513, in send
raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='ifconfig.me', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required')))
Reproduction Steps
When using a proxy that requires basic authentication to access an HTTPS (not HTTP) address, the system gives an error. The code is as follows:
It should be noted that the same code can run normally in Windows system, but there are problems with MacOS
System Information
The text was updated successfully, but these errors were encountered: