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

120.204* 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. 请将代理协议从 socks5 改为 httphttps
    例如:将 socks5://127.0.0.1:1080 改为 http://127.0.0.1:1080(确认您的代理服务是否同时支持 HTTP 代理)。
  2. 若您的代理工具只提供 SOCKS 端口,请在该工具中开启“允许来自局域网的连接”并启用 HTTP 代理端口(通常为 10817890),然后在软件中填写对应的 HTTP 地址。

补充说明

  • 预打包版无法自行安装 Python 包,因此不支持 SOCKS 代理。如果您坚持使用 SOCKS,需通过源码部署(使用 uv)并手动安装 httpx[socks] 依赖。
  • 填写位置:软件主界面“翻译视频和音频”功能区的“网络代理”输入框。
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