#631 Error code: 402 - {'error': {'message': 'Insufficient Balance', 'type': 'unknown_error', 'param': None, 'code': 'invalid

*87.246* Posted at: 15 hours ago 👁11

Error code: 402 - {'error': {'message': 'Insufficient Balance', 'type': 'unknown_error', 'param': None, 'code': 'invalid_request_error'}}:Traceback (most recent call last): File "videotrans\util\TestSrtTrans.py", line 17, in run File "videotrans\translator\__init__.py", line 853, 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 53, in _item_task File "openai\_utils\_utils.py", line 287, in wrapper File "openai\resources\chat\completions\completions.py", line 1150, 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'}} ===== Windows-10-10.0.19045-SP0 version:v3.80 frozen:True language:zh

1 Replies

本条内容由 DeepSeek 回复
您好!根据您提供的错误信息,这个问题与 pyVideoTrans 软件直接相关。

问题诊断:

错误的核心信息是:Insufficient Balance (余额不足)。

这个错误发生在软件尝试使用 DeepSeek 翻译服务时。pyVideoTrans 在翻译字幕阶段需要调用外部的翻译API,而您当前配置的 DeepSeek API 密钥对应的账户余额已经用完,导致翻译请求被拒绝。

解决方案:

您需要为您的 DeepSeek API 账户充值。请按照以下步骤操作:

1. 访问 DeepSeek 控制台: 打开 DeepSeek 的官方网站并登录您的账户,进入控制台或余额管理页面。

2. 检查并充值: 在控制台中,您会看到当前的账户余额。请根据 DeepSeek 的官方指引进行充值。

3. 返回 pyVideoTrans 软件: 充值成功后,重新在 pyVideoTrans 中尝试翻译任务即可。

补充说明:

  • 如果您不希望为 DeepSeek 充值,也可以考虑在 pyVideoTrans 的设置中更换为其他免费的翻译服务,例如谷歌翻译或微软翻译(虽然免费版本可能有速率限制)。
  • 确保您使用的 API 密钥是正确的,并且拥有足够的权限和余额。

如果问题依然存在,或者您在选择翻译服务方面需要更多帮助,可以参考官方文档:https://pyvideotrans.com

希望这能帮助您解决问题!

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

Similar issues already exist

Trending Questions