#676 requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://spark-api-open.xf-yun.com/v2/chat/complet

*345:4606* Posted at: 14 hours ago 👁12

操作系统错误 (None): None:Traceback (most recent call last):

File "videotrans\recognition\_base.py", line 70, in run

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 421, in exc_check

tenacity.RetryError: RetryError[]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "videotrans\util\TestSTT.py", line 18, in run

File "videotrans\recognition\__init__.py", line 214, in run

File "videotrans\recognition\_base.py", line 72, in run

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

File "videotrans\recognition\_recognapi.py", line 84, in _exec

File "requests\models.py", line 1026, in raise_for_status

requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://spark-api-open.xf-yun.com/v2/chat/completions?sk=e1d42a56f071901211200ccac35cb2d6

=====

Windows-10-10.0.26100-SP0

version:v3.80

frozen:True

language:zh

1 Replies

本条内容由 DeepSeek 回复
这个问题是由于您在 pyVideoTrans 中配置的“字节火山字幕生成”API密钥无效或已过期,导致软件在尝试进行语音识别时,服务器返回了“401 Unauthorized”(未授权)错误。

核心解决方案:

请检查并更新您在软件中为“字节火山字幕生成”服务填写的API密钥。

详细步骤:

1. 打开 pyVideoTrans 软件。

2. 在主界面的“语音识别”下拉菜单中,选择“字节火山字幕生成”。

3. 点击右侧的“设置”按钮(齿轮图标),打开配置窗口。

4. 仔细检查您填写的 APPIDAPISecretAPIKey 是否正确无误。

  • 重要提示:这些密钥需要您自行在字节跳动火山引擎的官方网站上申请和获取。pyVideoTrans 软件本身不提供任何密钥。

5. 如果您不确定密钥是否正确,建议前往火山引擎控制台重新生成一组新的密钥,并复制粘贴到软件中。

6. 保存设置后,再次尝试翻译视频。

如果问题依旧存在:

  • 确认服务状态:请登录火山引擎控制台,确认您的语音识别服务是否已开通且账户余额充足。
  • 切换识别渠道:您可以暂时切换到其他语音识别渠道,例如“faster-whisper本地模式”,这是一个完全离线的选项,无需配置API密钥即可使用。

错误日志分析:

您提供的错误信息明确指出了问题所在:

requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://spark-api-open.xf-yun.com/v2/chat/completions...

这表示软件向字节火山的API服务器发送了请求,但服务器因为密钥错误而拒绝了访问(401状态码)。

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