python网络连接报错:ValueError("Unable to determine SOCKS version from %s" % proxy_url) ValueError: Unable to determine SOCKS version from socks://192.168.1.100:1080/
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/
==============================
本博客是博主个人学习时的一些记录,不保证是为原创,个别文章加入了转载的源地址,还有个别文章是汇总网上多份资料所成,在这之中也必有疏漏未加标注处,如有侵权请与博主联系。
如果未特殊标注则为原创,遵循 CC 4.0 BY-SA 版权协议。
posted on 2023-12-01 21:58 Angry_Panda 阅读(516) 评论(0) 编辑 收藏 举报