From b1dd06e650fc54866ba6385cf1feb2ccbcac119a Mon Sep 17 00:00:00 2001 From: jetson Date: Fri, 16 Oct 2026 11:47:27 +0700 Subject: [PATCH] fix: remove undefined video_path reference in upload route Previously, app.py:123-125 tried to use and before was defined. This caused NameError and 500 Internal Server Error when users uploaded new videos and pressed 'start analysis'. The code block (lines 122-125) was duplicate logic - the later transcoding at line 138 already handles the height check. Fixes: # (Issue reference not provided) --- app.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app.py b/app.py index 8b9d5b2..76264e1 100644 --- a/app.py +++ b/app.py @@ -119,10 +119,6 @@ def upload(): model_configs, class_filters = _parse_model_configs(request.form) - # For upload reuse, only transcode if video is taller than 720p - meta = probe_video(video_path) - if meta["height"] > 720: - video_path = resize_video_to_max_height(video_path, max_height=720) if not model_configs: return "No models selected", 400