python应用proxy网络连接报错:
return super().send(request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/devil/anaconda3/envs/pytorch/lib/python3.11/site-packages/requests/adapters.py", line 454, in send conn = self.get_connection(request.url, proxies) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/devil/anaconda3/envs/pytorch/lib/python3.11/site-packages/requests/adapters.py", line 350, in get_connection proxy_manager = self.proxy_manager_for(proxy) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/devil/anaconda3/envs/pytorch/lib/python3.11/site-packages/requests/adapters.py", line 215, in proxy_manager_for manager = self.proxy_manager[proxy] = SOCKSProxyManager( ^^^^^^^^^^^^^^^^^^ File "/home/devil/anaconda3/envs/pytorch/lib/python3.11/site-packages/urllib3/contrib/socks.py", line 198, in __init__ raise ValueError("Unable to determine SOCKS version from %s" % proxy_url)
ValueError: Unable to determine SOCKS version from socks://192.168.1.100:1080/
==============================
解决方法:
export all_proxy=socks5://192.168.1.100:1080/ export ALL_PROXY=socks5://192.168.1.100:1080/
==============================
标签:version,SOCKS,Unable,proxy,determine,ValueError From: https://www.cnblogs.com/devilmaycry812839668/p/17870951.html