#7859 翻译字幕阶段出错 [DeepSeek] [deepseek] 无法连接到 https://api.deepseek.com/v1/,可能当前网络不可访问该API, 若是本地服务,请确认已部署并启动Connection error.

188.253**9 Posted at: 1 hour ago

翻译字幕阶段出错 [DeepSeek] [deepseek] 无法连接到 https://api.deepseek.com/v1/,可能当前网络不可访问该API, 若是本地服务,请确认已部署并启动
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\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: [Errno 11001] getaddrinfo failed

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

Traceback (most recent call l
......
11001] getaddrinfo failed

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

Traceback (most recent call last):

File "videotrans\translator\_openaicompat.py", line 83, in _item_task

File "openai\_utils\_utils.py", line 298, in wrapper

File "openai\resources\chat\completions\completions.py", line 1215, in create

File "openai\_base_client.py", line 1332, in post

File "openai\_base_client.py", line 1072, in request

openai.APIConnectionError: Connection error.

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

Traceback (most recent call last):

File "videotrans\task\job.py", line 35, in run

File "videotrans\task\job.py", line 137, in process_task

File "videotrans\task\translate_srt.py", line 51, in trans

File "videotrans\translator\_runner.py", line 67, in run

File "videotrans\translator\_base.py", line 71, in run

File "videotrans\translator\_base.py", line 209, in _run_srt

File "tenacity\__init__.py", line 338, in wrapped_f

File "tenacity\__init__.py", line 477, in call

File "tenacity\__init__.py", line 378, in iter

File "tenacity\__init__.py", line 400, in

File "concurrent\futures\_base.py", line 451, in result

File "concurrent\futures\_base.py", line 403, in __get_result

File "tenacity\__init__.py", line 480, in call

File "videotrans\translator\_openaicompat.py", line 85, in _item_task

videotrans.configure.excepts.StopTask: [deepseek] 无法连接到 https://api.deepseek.com/v1/,可能当前网络不可访问该API, 若是本地服务,请确认已部署并启动
Connection error.
[TranslateSrt]翻译字幕: OutputFormat=双语(目标语言在下)
[TaskCfgSTS]
原始输入文件名: K:/新建文件夹/Bear is Rescued from Harrowing Captivity BBC Earth Explore.srt,
输出结果保存到文件夹: K:/新建文件夹
翻译渠道:DeepSeek,原始语言:English,目标语言:Simplified Chinese, 已选 发送完整字幕
代理地址:http://127.0.0.1:7890


=
system:Windows-10-10.0.26200-SP0
version:v4.10
frozen:True
language:zh
root_dir:D:/BaiduDownload/win-pyvideotrans-v4.10

1 Replies

#1 DeepSeek reply at 1 hour ago

核心原因:网络 DNS 解析失败(getaddrinfo failed),软件无法解析 api.deepseek.com 的域名,导致连接被拒绝。

你填写了代理 http://127.0.0.1:7890,但 DeepSeek 是国内 API,不应走代理。若该代理未启动或已被关闭,软件仍强行通过代理请求,就会直接报连接/解析错误。

请按以下顺序排查:

  1. 清空代理:在主界面右侧「网络代理」文本框中清空内容并保存。DeepSeek 为国内 API,软件默认已将其列入免代理白名单,无需代理即可直连。
  2. 确认代理是否运行:若你确实需要保留代理(例如同时使用 Google 翻译),必须先启动本地代理软件并确认端口 7890 正确。端口错误或代理未运行会导致所有请求失败。
  3. 检查网络与 DNS:在 CMD 中执行 ping api.deepseek.com,若能解析出 IP 则网络正常;若提示"找不到主机",说明本机 DNS 有问题,可尝试刷新 DNS:ipconfig /flushdns,或更换 DNS 为 223.5.5.5。
  4. 验证密钥:确认已在 菜单 → 翻译设置 → DeepSeek 中正确填写 API Key(去 https://platform.deepseek.com 登录充值后获取)。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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 via ko-fi.com

Related resource