#4602 openai.UnprocessableEntityError: Error code: 422 - {'type': 'error', 'error': {'type': 'unprocessable_entity_error', 'me

219.76* Posted at: 1 hour ago 👁8

output new_sensitive (1027)
Traceback (most recent call last):
File "videotrans\task\_only_one.py", line 71, in run
File "videotrans\task\trans_create.py", line 689, in trans
File "videotrans\translator\__init__.py", line 1066, in run
File "videotrans\translator\_base.py", line 97, in run
File "videotrans\translator\_base.py", line 161, in _run_srt
File "videotrans\translator\_minimax.py", line 55, in _item_task
File "openai\_utils\_utils.py", line 286, in wrapper
File "openai\resources\chat\completions\completions.py", line 1211, in create
File "openai\_base_client.py", line 1297, in post
File "openai\_base_client.py", line 1070, in request
openai.UnprocessableEntityError: Error code: 422 - {'type': 'error', 'error': {'type': 'unprocessable_entity_error', 'message': 'output new_sensitive (1027)', 'http_code': '422'}, 'request_id': '0657f6ed8bbbd9dff3916afb95882daa'}


=
system:Windows-10-10.0.19045-SP0
version:v3.99
frozen:True
language:zh
root_dir:G:/videotrans/win pyvideotrans

1 Replies

报错是因为使用 Minimax 翻译渠道时,API 返回了内容安全错误(error code 1027: "output new_sensitive"),即翻译输出被判定为敏感内容,导致请求被拒绝。

解决方法:

  1. 更换翻译渠道:建议切换到 DeepSeek、ChatGPT、Google 等更稳定的渠道。在软件菜单中选择其他 AI 翻译渠道并填写对应 API Key。
  2. 若必须使用 Minimax

    • 尝试 取消勾选“发送完整字幕”,改为按行翻译,以降低单次请求的上下文长度。
    • 在菜单「工具→选项→高级选项→字幕翻译调整」中,将“AI翻译渠道每批字幕行数”调小(例如设为 5 行)。
    • 检查翻译内容是否包含特殊符号或争议性词汇,可适当修改提示词(位于 videotrans/prompts/srt/text/ 目录下)。
    • 联系 Minimax 客服了解该错误码具体触发规则。

请查阅相关文档:

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