#4459 RuntimeError: <400> InternalError.Algo.InvalidParameter: Range of input length should be [1, 8192]

116.10* Posted at: 3 hours ago 👁8

InternalError.Algo.InvalidParameter: Range of input length should be [1, 8192]:Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\__init__.py", line 964, in run
File "videotrans\translator\_base.py", line 97, in run
File "videotrans\translator\_base.py", line 161, in _run_srt
File "videotrans\translator\_qwenmt.py", line 55, in _item_task
RuntimeError: InternalError.Algo.InvalidParameter: Range of input length should be [1, 8192]


=
system:Windows-10-10.0.26200-SP0
version:v3.99
frozen:True
language:zh
root_dir:C:/Users/15879/Downloads/Compressed/win-pyvideotrans-v3.99

1 Replies

该错误是因为你使用的 QwenMT 翻译渠道(阿里机器翻译)对单次请求的文本长度有严格限制,必须 ≤ 8192 个字符。在你开启了“发送完整字幕”或“每批字幕行数”设置过高时,发送给 API 的字幕文本超过了这个上限,导致请求被拒。

解决方法(任选其一):

  1. 取消“发送完整字幕”:在主界面取消勾选 发送完整字幕,这样会按行发送,单行极少超过限制。
  2. 降低每批发量:进入 菜单 → 工具/选项 → 高级选项,找到 AI翻译渠道每批字幕行数,将其数值调小(例如从默认的 30 改为 10 或 5),确保每批文本总长度远低于 8192 字符。
  3. 若仍需要批量翻译长段落:可将长字幕预先拆分为更短的文本,或换用无此长度限制的翻译渠道(如 DeepSeek、OpenAI 等)。

修改后请点击 清理已生成 再重新执行任务。

请查阅相关文档:

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.

Related resource