#8498 无返回翻译结果self=[DeepSeek]: uuid='6529954c30', proxy_str='http://127.0.0.1:7897', translate_type=5, is_test=False, source_co

2a14**a Posted at: 1 hour ago

无返回翻译结果
self=[DeepSeek]: uuid='6529954c30', proxy_str='http://127.0.0.1:7897', translate_type=5, is_test=False, source_code='Simplified Chinese', target_code='English', common_target_code='en', api_url='https://api.deepseek.com/v1/', model_name='deepseek-v4-pro', trans_thread=40, wait_sec=0.0, local_dir=None, is_cuda=False, aisendsrt=True, ainame='deepseek', temperature=0.1, max_tokens=16384, reasoning_effort=None, extra_body=None
Traceback (most recent call last):
File "videotrans\task\only_one.py", line 90, in run
File "videotrans\task\_stage_translate.py", line 31, in trans
File "videotrans\translator\_runner.py", line 71, in run
File "videotrans\translator\_base.py", line 82, in run
File "videotrans\translator\_base.py", line 167, in _run_srt
videotrans.configure.excepts.TranslateSrtError: 无返回翻译结果
self=[DeepSeek]: uuid='6529954c30', proxy_str='http://127.0.0.1:7897', translate_type=5, is_test=False, source_code='Simplified Chinese', target_code='English', common_target_code='en', api_url='https://api.deepseek.com/v1/', model_name='deepseek-v4-pro', trans_thread=40, wait_sec=0.0, local_dir=None, is_cuda=False, aisendsrt=True, ainame='deepseek', temperature=0.1, max_tokens=16384, reasoning_effort=None, extra_body=None

trk=[TransCreate]: uuid='6529954c30', proxy_str='http://127.0.0.1:7897', cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: C:/Users/71737/Desktop/2-5 有理数的加法运算律.mp4,
输出结果保存到文件夹: C:/Users/71737/Desktop/_video_out/2-5 有理数的加法运算律-mp4,
临时文件夹: F:/pyVideoTrans/tmp/7044/6529954c30
已选 清理已存在
未启用CUDA加速
语音识别:faster-whisper(内置), large-v3-turbo, 发音语言: 简体中文, , 数据类型:default
翻译渠道:DeepSeek,原始语言:简体中文,目标语言:英语, 已选 发送完整字幕, settings.get('trans_thread')=5, settings.get('aitrans_thread')=40
配音渠道:Edge-TTS(免费), 角色:Liam(Male/CA), 配音语言:英语, 未选 二次语音识别
音量:+0%, 语速:+0%, 已选 音频加速, 未选 视频慢速
已选 移除每条字幕配音开头和结尾静音缓冲
静音移除力度: default
字幕: 嵌入硬字幕
代理地址: http://127.0.0.1:7897, precent=12, hasend=False, should_recogn=True, should_trans=True, should_dubbing=True, should_hebing=True, is_copy_video=True, video_codec_num=264, ignore_align=False, is_audio_trans=False, clone_ref='', should_recogn2=False, do_diarize=True
video_duration_ms=785433


=
system:Windows-10-10.0.26100-SP0
version:v4.17
frozen:True
language:zh_CN
root_dir:F:/pyVideoTrans

1 Replies

#1 DeepSeek reply at 1 hour ago

核心原因:DeepSeek 接口这次返回的是空内容,软件收到空字符串后,按现有逻辑抛出 TranslateSrtError: 无返回翻译结果。最常见的原因是:模型思考过程耗尽 token,或单批 40 条字幕输出过长被截断,也可能是因为代理导致请求异常。这不是软件 bug,而是渠道参数配置问题。

按下面顺序排查即可,多数情况做完第 1、2 步就能解决:

  1. 取消思考模式
    打开 菜单 → 翻译设置 → DeepSeek,确认 Thinking 复选框处于未选中状态。deepseek-v4-pro 开启思考后会先消耗大量 token,正文常常因此被挤空。你日志里 max_tokens=16384,而一次要发 40 条完整 SRT 字幕,token 很容易被吃光。
  2. 降低每批字幕行数
    菜单 → 工具/选项 → 高级选项 → 字幕翻译,把 AI翻译渠道每批字幕行数 从 40 改为 10~20。选中“发送完整字幕”时,40 条一起翻译,输出很容易超限被截断,结果是空返回。
  3. 清空代理后重试
    日志里 proxy_str='http://127.0.0.1:7897'。DeepSeek 是国内接口,默认不需要代理;代理不稳定或端口异常时,请求可能失败或返回空。把主界面 网络代理 清空保存后重试(软件内置免代理域名列表,DeepSeek 会自动绕过代理)。
  4. 换用另一个模型
    把 DeepSeek 设置里的模型改为 deepseek-v4-flash,或仍用 deepseek-v4-pro,但要确保第 1、2 步已处理。同时确认账户有余额,且模型名拼写有效。
  5. 检查原始字幕中是否有大量重复行
    若有类似 no, no, no, no...、hey, hey, hey... 的长重复字幕,AI 会陷入死循环直到耗尽 token 并返回空。这类行需先手动删改。
  6. 清理缓存后重跑
    删除 软件目录/tmp/translate_cache/ 下的缓存文件,并在主界面勾选 清理已生成 再执行,避免命中旧的空结果缓存。

如果做完以上操作仍报同样错误,请把 菜单-翻译设置-DeepSeek 中填写的模型名、是否勾选 Thinking,以及 logs/ 下当天日志底部约 30 行发来,进一步确认是限流、余额问题还是返回被截断。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
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.

Dondate via ko-fi.com

Related resource