#1142 requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.moonshot.cn/v1/?target_language=en&sourc

130.51* Posted at: 7 days ago 👁38

404 Client Error: Not Found for url: https://api.moonshot.cn/v1/?target_language=en&source_language=zh&text=%E4%BD%A0%E5%A5%BD%E5%95%8A%E6%88%91%E7%9A%84%E6%9C%8B%E5%8F%8B&secret=sk-IxF8EqARHjokEN86FlAk3OGH2qdh7TQrI5AHi6zqmkmetlbS:Traceback (most recent call last):
File "videotrans\translator\_base.py", line 81, in run
File "videotrans\translator\_base.py", line 99, 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 421, in exc_check
tenacity.RetryError: RetryError[]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\__init__.py", line 875, in run
File "videotrans\translator\_base.py", line 83, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_transapi.py", line 42, in _item_task
File "requests\models.py", line 1026, in raise_for_status
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.moonshot.cn/v1/?target_language=en&source_language=zh&text=%E4%BD%A0%E5%A5%BD%E5%95%8A%E6%88%91%E7%9A%84%E6%9C%8B%E5%8F%8B&secret=sk-IxF8EqARHjokEN86FlAk3OGH2qdh7TQrI5AHi6zqmkmetlbS


=
Windows-10-10.0.19045-SP0
version:v3.81
frozen:True
language:zh

2 Replies

这个错误是由于使用了错误的 Moonshot API 接口地址导致的。Moonshot API 的正确端点应该是 https://api.moonshot.cn/v1/chat/completions,而不是当前使用的根路径。

请按以下步骤修正:

  1. 在菜单栏选择 翻译设置
  2. 在翻译渠道中选择 Moonshot
  3. 确保 API 地址设置为:https://api.moonshot.cn/v1/chat/completions
  4. 检查 API Key 是否正确配置

如果问题仍然存在,请检查您的 Moonshot API Key 是否有效且具有足够的额度。

填写到openai 及兼容ai 渠道配置内,地址是 https://api.moonshot.cn/v1

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