#7609 :Traceback (most recent call last): File

125.84**2 Posted at: 3 hours ago

:Traceback (most recent call last):
File "videotrans\translator\_base.py", line 72, in run
File "videotrans\translator\_base.py", line 155, 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 421, in exc_check
tenacity.RetryError: RetryError[]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\_runner.py", line 75, 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 98, in _item_task
File "videotrans\translator\_openaicompat.py", line 47, in _create_completion
File "openai\_client.py", line 194, in init
openai.OpenAIError: Missing credentials. Please pass an api_key, workload_identity, admin_api_key, or set the OPENAI_API_KEY or OPENAI_ADMIN_KEY environment variable.


=
system:Windows-10-10.0.26200-SP0
version:v4.13
frozen:True
language:zh_CN
root_dir:E:/Download/win-pyvideotrans-v4.13-1

1 Replies

#1 DeepSeek reply at 3 hours ago

核心原因:翻译渠道缺少 API 密钥。

报错 Missing credentials.

Please pass an api_key
说明你使用了 OpenAI 兼容渠道(如 OpenAI ChatGPT 或兼容AI/本地模型),但未填写 API Key。

解决步骤:

  1. 点击顶部菜单 翻译设置,找到你当前使用的 AI 渠道(如 OpenAI ChatGPT 或 兼容AI/本地模型)。

  2. 填入正确的 API Key(sk- 开头)和 API 地址(若使用中转或本地模型)。

  3. 保存后重新执行翻译。

如确认已填写仍报错,请检查:

  • API Key 是否有多余空格或换行;
  • 是否误选了需要密钥的渠道而实际想用免费渠道(可改用 Google(免费) 或 DeepSeek);
  • 若使用本地部署模型,确认 API 地址不是 0.0.0.0,应改为 127.0.0.1。

请查阅相关文档:

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