#7804 Traceback (most recent call last): File

183.192**4 Posted at: 1 hour 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\task\only_one.py", line 89, in run
File "videotrans\task\_stage_translate.py", line 31, in trans
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.

cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: G:/BaiduNetdiskDownload/嫂子为改善我的早泄进行射精管理 寸止训练+淫语辱骂榨干/BLK 694.mp4,
输出结果保存到文件夹: G:/BaiduNetdiskDownload/嫂子为改善我的早泄进行射精管理 寸止训练+淫语辱骂榨干/_video_out/BLK 694-mp4,
临时文件夹: G:/BaiduNetdiskDownload/win-pyvideotrans-v4.14/tmp/4168/83afcb9a89
已选 清理已存在
未启用CUDA加速
未选 降噪
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 日语, 断句方式:默认断句
翻译渠道:Cheaper Inference,原始语言:日语,目标语言:简体中文, 已选 发送完整字幕
未选 配音角色,不进行配音
字幕: 嵌入硬字幕
video_duration_ms=7052900


=
system:Windows-10-10.0.19045-SP0
version:v4.14
frozen:True
language:zh_CN
root_dir:G:/BaiduNetdiskDownload/win-pyvideotrans-v4.14

1 Replies

#1 DeepSeek reply at 1 hour ago

核心原因是 OpenAI 兼容渠道的 API Key 缺失。

你当前使用的翻译渠道 Cheaper Inference 需要 API 密钥,但软件没有读取到,因此抛出 Missing credentials.

Please pass an api_key...
。

解决方法:

  1. 打开软件顶部菜单 翻译设置,找到 Cheaper Inference 对应设置项。

  2. 填入从该服务商处获取的 API Key,并保存。

  3. 回到主界面重新执行翻译,确保翻译渠道与已配置密钥的渠道一致。

  4. 如果 Cheaper Inference 不需要或不支持该格式的密钥,请改选其他翻译渠道,例如:

    • Google(免费)(默认,国内需科学上网)
    • DeepSeek / OpenAI兼容 等已正确配置密钥的 AI 渠道
    • M2M100(内置) 本地翻译(首次使用需在线下载模型)

补充说明:报错发生在字幕翻译阶段,与语音识别、硬字幕嵌入无关。

请查阅相关文档:

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