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

2401:f1e0* Posted at: 16 hours ago

:Traceback (most recent call last):
File "videotrans\translator\_base.py", line 71, in run
File "videotrans\translator\_base.py", line 206, 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 63, in run
File "videotrans\translator\_base.py", line 74, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_openaicompat.py", line 76, in _item_task
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.07
frozen:True
language:zh
root_dir:D:/win-pyvideotrans-v4.05-0711

1 Replies

这个错误是因为你使用的翻译渠道(OpenAI 兼容接口)缺少 API 密钥(api_key)。

解决办法:

  1. 打开软件主界面,点击 菜单 → 翻译设置
  2. 在对应渠道(例如 OpenAI ChatGPT 或 兼容AI/本地模型)的设置面板中,填写有效的 API 密钥。
  3. 确保该密钥有可用余额且未被限制,保存后重新执行任务。
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 via ko-fi.com

Dondate via PayPal

Related resource