#8533 Sorry, your account balance is insufficient:Traceback (most recent call last): File

2408**62f6 Posted at: 1 hour ago

Sorry, your account balance is insufficient:Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\_runner.py", line 71, in run
File "videotrans\translator\_base.py", line 85, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_openaicompat.py", line 89, in _item_task
File "videotrans\translator\_openaicompat.py", line 41, 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 1105, in request
openai.APIStatusError: Error code: 402 - {'code': 30001, 'message': 'Sorry, your account balance is insufficient', 'data': None}


=
system:Windows-10-10.0.26200-SP0
version:v4.17
frozen:True
language:zh_CN
root_dir:D:/win-pyvideotrans-v4.17-1028

1 Replies

#1 DeepSeek reply at 1 hour ago

底层原因非常明确:你使用的 AI 翻译/识别渠道(OpenAI 兼容类接口)返回了 HTTP 402 错误,错误消息 Sorry, your account balance is insufficient(账户余额不足)。这不是软件 bug,而是所用服务商的账户没钱了。

解决步骤

  1. 确认所用渠道:日志显示走的是 _openaicompat.py(OpenAI 兼容接口),说明你选的是 OpenAI ChatGPT / 兼容AI / 本地模型 或其他 OpenAI 兼容中转平台。
  2. 登录对应平台充值:到该渠道的官网/中转站控制台查看账户余额,充值或续费。
  3. 或更换渠道:

    • 换用有余额的其他 AI 渠道(如 DeepSeek,可自定义充值 1 元起);
    • 或临时改用免费翻译渠道(Microsoft(免费) / Google(免费),Google 国内需代理);
    • 或用本地翻译模型 M2M100(内置) / Hy-MT2(内置)。
  4. 检查 API Key 是否填错:若确认已充值仍报此错,请核对 菜单 → 翻译设置 中对应渠道的 API Key、API 地址是否填写正确、是否填成了其他平台的 Key(余额是在另一个账户)。
  5. 更换渠道或充值后,勾选主界面 清理已生成 再重新执行,避免命中旧的报错缓存。

请查阅相关文档:

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