#2062 openai.AuthenticationError: Error code: 401 - {'error': {'message': 'Authentication Fails, Your api key: ****eb98 is inv

18.179* Posted at: 20 hours ago 👁16

API密钥错误,请检查密钥是否正确 Error code: 401 - {'error': {'message': 'Authentication Fails, Your api key:


eb98 is invalid', 'type': 'authentication_error', 'param': None, 'code': 'invalid_request_error'}}: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 78, in run
File "videotrans\translator\_base.py", line 137, in _run_srt
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\_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.AuthenticationError: Error code: 401 - {'error': {'message': 'Authentication Fails, Your api key:
eb98 is invalid', 'type': 'authentication_error', 'param': None, 'code': 'invalid_request_error'}}


=
system:Windows-10-10.0.26200-SP0
version:v3.90
frozen:True
language:zh
root_dir:D:/win-pyvideotrans-3.90

1 Replies

API 密钥错误。错误信息明确指出您的 DeepSeek API 密钥无效。

解决方案:

  1. 检查密钥: 请前往 DeepSeek 官网,登录您的账户,在 API 管理页面确认您的 API 密钥是否正确。确保复制完整,没有多余的空格或字符。
  2. 重新填写: 在 pyVideoTrans 主界面,点击“翻译设置”按钮,在 DeepSeek 对应的输入框中,删除旧密钥,重新粘贴正确的新密钥
  3. 保存并测试: 保存设置后,可以尝试使用“工具箱 -> 批量翻译 SRT”功能对一个字幕文件进行测试,看是否还会报错。

如果确认密钥无误但问题依旧,请检查您的 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

Similar issues already exist

Trending Questions