#7443 Invalid API-key provided.:Traceback (most recent call last): File

154.12**4 Posted at: 3 hours ago

Invalid API-key provided.: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 "videotrans\translator\_qwenmt.py", line 69, in _item_task
videotrans.configure.excepts.TranslateSrtError: Invalid API-key provided.


=
system:Windows-10-10.0.19045-SP0
version:v4.12
frozen:True
language:zh_CN
root_dir:E:/PY/win-pyvideotrans-v4.12-0913

1 Replies

#1 DeepSeek reply at 3 hours ago

错误核心原因是:翻译渠道“阿里百炼”的 API-key 无效或配置有误(报错 Invalid API-key provided.),即调用时被阿里百炼平台拒绝鉴权。

请按以下步骤排查:

  1. 确认渠道:你当前使用的是阿里百炼(QwenMT)翻译渠道,不是本地模型。需前往 阿里百炼平台 开通服务并获取正确的 API Key。
  2. 核对密钥:打开 菜单 → 翻译设置 → 阿里百炼,检查填写的 API Key 是否完整、是否有多余空格、是否已过期,建议重新复制粘贴一次。
  3. 检查模型名称:若你在“阿里百炼”中手动填写了模型名,需确保所选模型与任务类型匹配:

    • 字幕翻译必须选 纯文本模型(如 qwen-mt 系列);
    • 不能选 qwen-asr 开头的模型;
    • 多模态模型不允许作为字幕翻译模型,这是阿里百炼平台的限制。
  4. 确认账户状态:登录阿里百炼控制台,确认服务已开通、账户有余额或额度。
  5. 替代方案:若暂时无法解决,可改用其他翻译渠道,例如 DeepSeek(效果好、价格低),或 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