#776 openai.PermissionDeniedError: Error code: 403 - {'error': {'message': 'token quota is not enough, token remain quota: $0

*207.151* Posted at: 6 hours ago 👁7

翻译字幕阶段出错:无访问权限或模型名称错误 [OpenAI ChatGPT]:

Traceback (most recent call last):

File "videotrans\task\job.py", line 129, in run

File "videotrans\task\trans_create.py", line 431, in trans

File "videotrans\translator\__init__.py", line 844, in run

File "videotrans\translator\_base.py", line 79, in run

File "videotrans\translator\_base.py", line 97, in _run_text

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 400, in

File "concurrent\futures\_base.py", line 439, in result

File "concurrent\futures\_base.py", line 391, in __get_result

File "tenacity\__init__.py", line 480, in __call__

File "videotrans\translator\_chatgpt.py", line 169, 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.PermissionDeniedError: Error code: 403 - {'error': {'message': 'token quota is not enough, token remain quota: $0.001218, need quota: $0.003114 (request id: 20251003063350734239753Rxo70gvd)', 'type': 'new_api_error', 'param': '', 'code': 'pre_consume_token_quota_failed'}}

=====

Windows-10-10.0.26100-SP0

version:v3.80

frozen:True

language:zh

1 Replies

本条内容由 DeepSeek 回复
翻译字幕阶段出错是因为您的OpenAI API账户余额不足。错误信息显示您的账户剩余额度为$0.001218,但本次翻译请求需要$0.003114,导致API调用被拒绝。

解决方法:

1. 充值OpenAI账户:登录OpenAI平台(platform.openai.com),为您的API账户充值足够的余额

2. 检查API密钥:确认在软件"翻译设置"中填写的OpenAI API密钥正确无误

3. 更换翻译渠道:如果暂时无法充值,可以切换到其他免费翻译渠道,如:

  • Google翻译(需要科学上网)
  • Microsoft翻译
  • 百度翻译(仅限中国IP)
  • 腾讯翻译(仅限中国IP)

操作步骤:

1. 打开pyVideoTrans软件

2. 点击菜单栏"翻译设置"

3. 在"翻译渠道"下拉菜单中选择其他可用的翻译服务

4. 根据选择的渠道填写相应的API配置信息

5. 重新开始翻译任务

如果问题持续存在,请检查网络连接是否稳定,特别是使用需要科学上网的翻译渠道时。

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