#970 <p>Your client does not have permission to get URL <code>/v1beta/openai/chat/completions</code> from this server. <ins>

2a13:8a40* Posted at: 6 hours ago 👁7

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

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 865, 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\_gemini.py", line 60, 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 403 (Forbidden)!!1

{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px} > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}

403. That’s an error.

Your client does not have permission to get URL /v1beta/openai/chat/completions from this server. That’s all we know.

=====

Windows-10-10.0.26100-SP0

version:v3.80

frozen:True

language:zh

1 Replies

本条内容由 gpt-5-mini 回复
核心原因很可能是:用于 Gemini 的 API Key/账户没有该模型的访问权限、在翻译设置中填错了模型名称或渠道,或当前 pyVideoTrans 版本与所用服务的接口不兼容(HTTP 403 表示“无权限/被拒绝”)。

请按下列步骤排查并修复:

1. 立刻检查翻译通道与模型配置

  • 打开 主界面 -> 菜单 -> 翻译设置,确认已选择 Gemini 作为翻译渠道(若使用“OpenAI/Gemini”兼容层,请确认选择正确)。
  • 确认“模型名称/型号”字段与您在提供方控制台看到的名称完全一致(区分大小写、无多余空格)。

2. 检查并重新配置 API Key(videotrans/params.json)

  • 在翻译设置中确认已填写正确的 API Key;params.json 中也会保存密钥(路径:软件根目录/videotrans/params.json)。
  • 若不确定 Key 是否有效,登录到您购买/申请 Gemini 的服务控制台,确认 Key 状态、权限及是否允许调用该模型接口。

3. 验证账户是否有该模型权限

  • 403 很常见于“账号没有访问指定模型”的情况(例如模型在白名单或付费层)。在服务控制台确认该 Key 是否被授权使用 Gemini 模型。

4. 排除网络/代理或地域限制问题

  • 如果处于公司网络或有局域网代理,可能被屏蔽或改写请求导致 403。尝试在家里或使用可以访问该服务的网络/代理下重试,或在软件中设置代理(菜单 -> 网络/翻译设置可以配置代理)。

5. 临时排查法:切换翻译渠道或版本

  • 将翻译渠道临时切换到另一个可用在线渠道(如 Google/Microsoft/其他)以确认是否为 Gemini 特有问题。
  • 您当前是 v3.80,建议更新到 Windows 预打包最新版 v3.81(changelog/兼容性修复可能涉及 API 调用路径),再重试。

6. 若使用自定义/第三方 OpenAI 兼容层注意点

  • 若通过某些兼容层或代理转发到 /v1beta/openai/chat/completions,请确认该转发层对目标模型有权限并且不会替换/删改请求头或 API Key。

7. 如果以上操作无效,请提供日志以便进一步定位

  • 请把最新的日志文件(位于 软件根目录/logs/ 下,按日期命名的 .log 文件)粘贴或上传,优先提供发生错误时的同一天的日志片段。
  • 若可能,请同时告知:翻译设置截图(通道、模型名、是否使用代理)、是否能在服务控制台用该 Key 成功调用模型。

如果需要我帮您看日志,请把对应的 .log 内容贴上(或将出错时间点的日志片段提供出来)。

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