#7243 [deepseek] 无法连接到 https://api.deepseek.com/v1/,可能当前网络不可访问该API, 若是本地服务,请确认已部署并启动Connection error.:Traceback (most recent c

2409**a749 Posted at: 1 day ago

[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 154, in _connect
File "httpcore\_backends\sync.py", line 152, in start_tls
File "contextlib.py", line 153, in exit
File "httpcore\_exceptions.py", line 14, in map_exceptions
httpcore.ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1017)

The above exception was the direct cause of the following except
......
ttpx\_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: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1017)

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

Traceback (most recent call last):
File "videotrans\translator\_openaicompat.py", line 88, in _item_task
File "videotrans\translator\_openaicompat.py", line 48, in _create_completion
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\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\_runner.py", line 67, in run
File "videotrans\translator\_base.py", line 70, in run
File "videotrans\translator\_base.py", line 153, 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 90, in _item_task
videotrans.configure.excepts.StopTask: [deepseek] 无法连接到 https://api.deepseek.com/v1/,可能当前网络不可访问该API, 若是本地服务,请确认已部署并启动
Connection error.


=
system:Windows-10-10.0.26200-SP0
version:v4.12
frozen:True
language:zh_CN
root_dir:D:/Translate AI

1 Replies

#1 DeepSeek reply at 1 day ago

核心原因是 SSL 证书校验失败CERTIFICATE_VERIFY_FAILED: self signed certificate in certificate chain)。这说明你的网络环境中存在一个代理/中间人(例如公司防火墙、杀软 HTTPS 扫描、或科学上网工具的 SSL 拦截),它返回的是自签名证书,导致 Python 的证书链校验不通过,请求根本无法到达 DeepSeek 服务器。

排查与解决步骤:

  1. 检查并关闭代理

    • 查看主界面「对齐控制」右侧的网络代理文本框。
    • 如果你填了代理地址,请先清空并保存,再重试。
    • 注意:DeepSeek 是国内 API,不需要代理,填了代理反而会失败。
  2. 关闭 HTTPS 扫描类软件

    • 关闭杀毒软件(360、火绒、卡巴斯基等)中的「HTTPS 扫描 / SSL 检测」功能,或将 pyVideoTrans 加入信任白名单。
    • 公司网络环境如开启了 SSL 中间人解密,也会导致此问题,需联系网管放行。
  3. 检查系统时间

    • 若系统时间不正确,会导致证书被判定为无效,请将 Windows 时间同步为正确的当前时间。
  4. 验证 API 密钥是否已填写

    • 若仅未填密钥,通常报的是 401 而非 SSL 错误,但请一并确认:菜单 → 翻译设置 → DeepSeek 中已正确填入 API Key。
  5. 重启软件后重试

    • 修改配置后必须重启软件生效。

如果以上操作后仍报同样的 SSL 错误,请提供软件安装目录下 logs/ 文件夹中最新日志文件的末尾 30 行以便进一步分析。

请查阅相关文档:

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