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

183.213* Posted at: 3 hours ago 👁6

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


741b 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 924, in run
File "videotrans\translator\_base.py", line 78, in run
File "videotrans\translator\_base.py", line 137, in _run_srt
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:
741b is invalid', 'type': 'authentication_error', 'param': None, 'code': 'invalid_request_error'}}


=
system:Windows-10-10.0.26100-SP0
version:v3.92
frozen:True
language:zh
root_dir:D:/py/win-pyvideotrans-v3.92

1 Replies

API 密钥错误,请检查您为 DeepSeek 翻译渠道配置的 API Key 是否正确且有效。

解决步骤:

  1. 检查 API Key:请登录 DeepSeek 开放平台 确认您的 API Key 是否有效、未过期,并且有足够的余额。
  2. 核对配置:在 pyVideoTrans 主界面,点击“翻译设置”按钮,找到 DeepSeek 渠道,确保:

    • API Key:正确粘贴,前后无多余空格。
    • API URL:通常为 https://api.deepseek.com,请确认无误。
  3. 测试连接:在“翻译设置”页面,填写好 Key 和 URL 后,可以点击“测试”按钮验证连接是否成功。
  4. 更换渠道:如果确认 Key 无误但问题依旧,可以暂时切换到其他翻译渠道(如 Google、ChatGPT 等)继续工作。

请查看更多参考文档:

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