#5258 ImportError: Using SOCKS proxy, but the 'socksio' package is not installed. Make sure to install httpx using `pip instal

2407:d840* Posted at: 1 hour ago

网络连接失败:Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\__init__.py", line 858, in run
File "videotrans\translator\_base.py", line 75, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_openaicompat.py", line 74, in _item_task
File "openai\_client.py", line 226, in init
File "openai\_base_client.py", line 909, in init
File "openai\_base_client.py", line 839, in init
File "httpx\_client.py", line 697, in init
File "httpx\_client.py", line 700, in
File "httpx\_client.py", line 750, in _init_proxy_transport
File "httpx\_transports\default.py", line 191, in init
ImportError: Using SOCKS proxy, but the 'socksio' package is not installed. Make sure to install httpx using pip install httpx[socks].


=
system:Windows-10-10.0.26200-SP0
version:v4.01
frozen:True
language:zh
root_dir:C:/Users/kjncy/Downloads/win-pyvideotrans-v4.01-0602

1 Replies

这是由于您在软件的网络代理设置中填写了 SOCKS 代理地址(如 socks5://...),但 pyVideoTrans 绿色版打包时未包含 socksio 库,导致无法建立 SOCKS 连接。

解决方案:

  1. 改用 HTTP/HTTPS 代理
    在软件的主界面第 5 行“网络代理”输入框中,将代理地址格式改为 http://127.0.0.1:端口号(例如 http://127.0.0.1:7890),而不是 socks5://...
  2. 如果您必须使用 SOCKS 代理

    • 请改用源码部署方式,并在安装依赖后手动安装 socksio 库:

      pip install httpx[socks]
    • 绿色版(sp.exe)无法添加额外库,因此只能选择 HTTP 代理。
  3. 检查代理设置是否正确保存
    修改后请点击“保存”或重新启动软件确保生效。

请查阅相关文档:

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update. Dondate: ko-fi.com/jianchang512

Related resource

Similar issues already exist