#1813 服务返回错误:Insufficient Balance:Traceback (most recent call last): File "videotrans\util\TestSrtTrans.py", line 19, in run

110.152* Posted at: 2 days ago 👁20

服务返回错误:Insufficient Balance:Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\__init__.py", line 923, in run
File "videotrans\translator\_base.py", line 81, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_deepseek.py", line 55, in _item_task
File "openai\_utils\_utils.py", line 286, in wrapper
File "openai\resources\chat\completions\completions.py", line 1156, in create
File "openai\_base_client.py", line 1259, in post
File "openai\_base_client.py", line 1047, in request
openai.APIStatusError: Error code: 402 - {'error': {'message': 'Insufficient Balance', 'type': 'unknown_error', 'param': None, 'code': 'invalid_request_error'}}

1 Replies

这个错误表明您使用的 DeepSeek API 账户余额不足。请按以下步骤解决:

  1. 检查并充值 DeepSeek 账户:

    • 登录 DeepSeek 开放平台
    • 在控制台查看您的 API 余额,如果余额不足,请进行充值。
  2. 在 pyVideoTrans 中更换翻译渠道(临时方案):

    • 在软件主界面,第 3 行“翻译渠道”下拉菜单中,暂时选择其他可用的渠道,例如:

      • 免费渠道:Google(需配置网络代理)、微软、DeepLX。
      • 其他 AI 渠道:如果您有其他平台的 API Key,如 OpenAI、Gemini、智谱AI 等。
  3. 确保 API Key 正确配置:

    • 在菜单栏选择 设置 -> 翻译设置
    • 找到 “DeepSeek” 部分,确认您填入的 API Key 有效且未过期。

完成 DeepSeek 账户充值后,即可重新使用该渠道进行翻译。

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.

Donate: https://ko-fi.com/jianchang512

Trending Questions