ATH-MaaS/Pixelle-Video · error · FileNotFoundError

Video file not found: {video_path}

Error message

Video file not found: {video_path}

What it means

The video-analysis workflow callable validates its inputs before doing any work and raises FileNotFoundError when the supplied video path does not exist on disk. This is a fail-fast guard so the expensive workflow execution (resolve_workflow_path + kit.execute) is never started for a missing input.

Source

Thrown at pixelle_video/services/video_analysis.py:113

            
            # Use local ComfyUI (future)
            description = await pixelle_video.video_analysis(
                "temp/01_segment.mp4",
                source="selfhost"
            )
            
            # Use specific workflow (bypass source-based resolution)
            description = await pixelle_video.video_analysis(
                "temp/01_segment.mp4",
                workflow="runninghub/custom_video_analysis.json"
            )
        """
        from pixelle_video.utils.workflow_util import resolve_workflow_path
        
        # 1. Validate video path
        video_path_obj = Path(video_path)
        if not video_path_obj.exists():
            raise FileNotFoundError(f"Video file not found: {video_path}")
        
        # 2. Resolve workflow path using convention
        if workflow is None:
            # Use standardized naming: {source}/analyse_video.json
            workflow = resolve_workflow_path("analyse_video", source)
            logger.info(f"Using {source} workflow: {workflow}")
        
        # 3. Resolve workflow (returns structured info)
        workflow_info = self._resolve_workflow(workflow=workflow)
        
        # 4. Build workflow parameters
        workflow_params = {
            "video": str(video_path)  # Pass video path to workflow
        }
        
        # Add any additional parameters
        workflow_params.update(params)
        

View on GitHub (pinned to 848b054e4f)

Solutions

  1. Print/verify the exact path with os.path.abspath and confirm it exists before calling
  2. Download remote videos to a local temp file first, then pass the local path
  3. Check for temp-file cleanup races — generate and analyze within the same lifetime
  4. Confirm correct working directory / base path when using relative paths

Example fix

// before
await analyzer(video_path='https://cdn.example.com/clip.mp4')
// after
local = download_to_temp('https://cdn.example.com/clip.mp4')
assert Path(local).exists()
await analyzer(video_path=local)
Defensive patterns

Strategy: validation

Validate before calling

from pathlib import Path

def assert_local_video(video_path: str) -> Path:
    p = Path(video_path)
    if str(video_path).startswith(('http://', 'https://', 's3://')):
        raise ValueError('pass a local file path, not a URL')
    if not p.is_file():
        raise FileNotFoundError(f'video missing before call: {p.resolve()}')
    return p

Try / catch

try:
    description = await analyzer(video_path=vp)
except FileNotFoundError as e:
    logger.error(f'bad video input: {e}')
    raise InputValidationError('video_path') from e

Prevention

When it happens

Trigger: Calling the analyzer (its __call__) with a video_path string/Path that os.path.exists() reports False — deleted file, typo, wrong mount, or a URL/URI passed instead of a local path.

Common situations: Passing remote URLs (http://, s3://) instead of downloading first; files removed by a temp-dir cleanup between generation and analysis; path built from joining with a wrong base directory; case-sensitive filesystem mismatches.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


AI-assisted analysis of ATH-MaaS/Pixelle-Video@848b054e4f (2026-08-30). Data as JSON: /api/errors/7229dceb32c27cf3. Report an issue: GitHub.