From 15967929ef362d73456e4e60f6cb70ea68015816 Mon Sep 17 00:00:00 2001 From: Accusys Date: Wed, 5 Aug 2026 01:45:59 +0800 Subject: [PATCH] fix: ASR fails to find cut.json when executor uses .tmp output path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ASR script used output_path.replace('.asr.json', '.cut.json') to find CUT file - Executor passes output path with .tmp suffix (xxx.asr.json.tmp) - This produced wrong path: xxx.cut.json.tmp (doesn't exist) - Fix: use --uuid to construct CUT path from output_dir instead - Also added executor Full command logging for debugging Fixed IMG_9449 (1).MOV ASR failure: status changed from failed → completed --- scripts/asr_processor.py | 7 ++++++- src/core/processor/executor.rs | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/asr_processor.py b/scripts/asr_processor.py index 345e2f77..63d35c2f 100755 --- a/scripts/asr_processor.py +++ b/scripts/asr_processor.py @@ -181,7 +181,12 @@ def run_asr(video_path, output_path, uuid: str = "", fps: float = None): if fps is not None: print(f"[ASR] Using CLI-provided FPS: {fps}", file=sys.stderr) else: - cut_path_check = output_path.replace(".asr.json", ".cut.json") + # Use uuid to construct CUT path (output_path may have .tmp suffix from executor) + output_dir = os.path.dirname(output_path) + if uuid and output_dir: + cut_path_check = os.path.join(output_dir, f"{uuid}.cut.json") + else: + cut_path_check = output_path.replace(".asr.json", ".cut.json") fps = get_fps_from_cut(cut_path_check) if fps: print(f"[ASR] FPS from CUT: {fps}", file=sys.stderr) diff --git a/src/core/processor/executor.rs b/src/core/processor/executor.rs index ed0f66fd..790b667b 100644 --- a/src/core/processor/executor.rs +++ b/src/core/processor/executor.rs @@ -502,6 +502,7 @@ impl PythonExecutor { cmd.process_group(0); tracing::info!("[{}] Starting: {:?}", log_prefix, script_name); + tracing::info!("[{}] Full command: {:?}", log_prefix, cmd); let mut child = cmd .spawn()