#5495 TaskCfgSTS(is_cuda=False, uuid='56626eb5be', cache_folder=None, target_dir='X:/c.字幕文件汇总/失忆后和死对头闪婚了-字幕', source_language=

116.25* Posted at: 1 hour ago

翻译字幕阶段出错 [兼容AI/本地模型] Connection error.
Traceback (most recent call last):
File "httpx\_transports\default.py", line 101, in map_httpcore_exceptions
File "httpx\_transports\default.py", line 250, in handle_request
File "httpcore\_sync\connection_pool.py", line 216, in handle_request
File "httpcore\_sync\connection_pool.py", line 196, in handle_request
File "httpcore\_sync\http_proxy.py", line 289, in handle_request
File "httpcore\_sync\connection.py", line 99, in handle_request
File "httpcore\_sync\connection.py", line 76, in handle_request
File "httpcore\_sync\connection.py", line 122, in _connect
File "httpcore\_backends\sync.py", line 205, in connect_tcp
File "contextlib.py", line 153, in exit
File "httpcore\_exceptions.py", line 14, in map_exceptions
httpcore.ConnectError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "openai\_base_client.py", line 1005, in request
File "httpx\_client.py", line 914, in send
File "httpx\_client.py", line 942, in _send_handling_auth
File "httpx\_client.py", line 979, in _send_handling_redirects
File "httpx\_client.py", line 1014, in _send_single_request
File "httpx\_transports\default.py", line 249, in handle_request
File "contextlib.py", line 153, in exit
File "httpx\_transports\default.py", line 118, in map_httpcore_exceptions
httpx.ConnectError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "videotrans\task\job.py", line 173, in run
File "videotrans\task\_translate_srt.py", line 44, in trans
File "videotrans\translator\__init__.py", line 1000, in run
File "videotrans\translator\_base.py", line 100, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_localllm.py", line 49, in _item_task
File "openai\_utils\_utils.py", line 286, in wrapper
File "openai\resources\chat\completions\completions.py", line 1211, in create
File "openai\_base_client.py", line 1297, in post
File "openai\_base_client.py", line 1037, in request
openai.APIConnectionError: Connection error.
TaskCfgSTS(is_cuda=False, uuid='56626eb5be', cache_folder=None, target_dir='X:/c.字幕文件汇总/失忆后和死对头闪婚了-字幕', source_language=None, source_language_code='Simplified Chinese', source_sub='X:/c.字幕文件汇总/失忆后和死对头闪婚了-字幕/失忆后和死对头闪婚了-中文字幕.srt', source_wav=None, source_wav_output=None, target_language=None, target_language_code='English', target_sub='X:/c.字幕文件汇总/失忆后和死对头闪婚了-字幕/失忆后和死对头闪婚了-中文字幕.English.srt', target_wav=None, target_wav_output=None, name='X:/c.字幕文件汇总/失忆后和死对头闪婚了-字幕/失忆后和死对头闪婚了-中文字幕.srt', noextname='失忆后和死对头闪婚了-中文字幕', basename='失忆后和死对头闪婚了-中文字幕.srt', ext='srt', dirname='//192.168.9.247/海外运营/c.字幕文件汇总/失忆后和死对头闪婚了-字幕', shound_del_name=None, translate_type=8)


=
system:Windows-10-10.0.26200-SP0
version:v3.99
frozen:True
language:zh
root_dir:E:/win-pyvideotrans-v3.99-428

1 Replies

该错误是因为软件尝试连接到"兼容AI/本地模型"翻译渠道的 API 地址时,目标服务器拒绝了连接(通常是服务未运行、地址或端口填写错误)。

请按以下步骤排查:

  1. 确认本地大模型服务已启动:确保你部署的兼容 OpenAI API 格式的本地服务(如 Ollama、vLLM、LM Studio 等)正在运行,并监听在你填写的地址和端口上。
  2. 检查 API 地址:打开 菜单 → 翻译设置 → 本地大模型设置,检查填写的 API 地址格式是否正确(例如 http://127.0.0.1:11434/v1),注意不能使用 0.0.0.0,需改为 127.0.0.1 或实际 IP。
  3. 测试连通性:在浏览器中直接访问该 API 地址(如 http://127.0.0.1:11434/v1/models),看是否能返回 JSON 数据。若无法访问,说明服务未启动或端口错误。
  4. 关闭防火墙/代理:临时关闭系统防火墙,或确保代理设置不会干扰本地连接(软件主界面代理文本框请清空,本地服务不走代理)。
  5. 若使用远程服务器:确保服务器防火墙允许该端口入站,并且网络互通。

请查阅相关文档:

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