{"record":{"id":"7229dceb32c27cf3","repo":"ATH-MaaS/Pixelle-Video","slug":"video-file-not-found-video-path-7229dc","errorCode":null,"errorMessage":"Video file not found: {video_path}","messagePattern":"Video file not found: (.+?)","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"pixelle_video/services/video_analysis.py","lineNumber":113,"sourceCode":"            \n            # Use local ComfyUI (future)\n            description = await pixelle_video.video_analysis(\n                \"temp/01_segment.mp4\",\n                source=\"selfhost\"\n            )\n            \n            # Use specific workflow (bypass source-based resolution)\n            description = await pixelle_video.video_analysis(\n                \"temp/01_segment.mp4\",\n                workflow=\"runninghub/custom_video_analysis.json\"\n            )\n        \"\"\"\n        from pixelle_video.utils.workflow_util import resolve_workflow_path\n        \n        # 1. Validate video path\n        video_path_obj = Path(video_path)\n        if not video_path_obj.exists():\n            raise FileNotFoundError(f\"Video file not found: {video_path}\")\n        \n        # 2. Resolve workflow path using convention\n        if workflow is None:\n            # Use standardized naming: {source}/analyse_video.json\n            workflow = resolve_workflow_path(\"analyse_video\", source)\n            logger.info(f\"Using {source} workflow: {workflow}\")\n        \n        # 3. Resolve workflow (returns structured info)\n        workflow_info = self._resolve_workflow(workflow=workflow)\n        \n        # 4. Build workflow parameters\n        workflow_params = {\n            \"video\": str(video_path)  # Pass video path to workflow\n        }\n        \n        # Add any additional parameters\n        workflow_params.update(params)\n        ","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/ATH-MaaS/Pixelle-Video/blob/848b054e4fae40dabc62ec58e960b573e83793ac/pixelle_video/services/video_analysis.py#L95-L131","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Print/verify the exact path with os.path.abspath and confirm it exists before calling","Download remote videos to a local temp file first, then pass the local path","Check for temp-file cleanup races — generate and analyze within the same lifetime","Confirm correct working directory / base path when using relative paths"],"exampleFix":"// before\nawait analyzer(video_path='https://cdn.example.com/clip.mp4')\n// after\nlocal = download_to_temp('https://cdn.example.com/clip.mp4')\nassert Path(local).exists()\nawait analyzer(video_path=local)","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\ndef assert_local_video(video_path: str) -> Path:\n    p = Path(video_path)\n    if str(video_path).startswith(('http://', 'https://', 's3://')):\n        raise ValueError('pass a local file path, not a URL')\n    if not p.is_file():\n        raise FileNotFoundError(f'video missing before call: {p.resolve()}')\n    return p","typeGuard":null,"tryCatchPattern":"try:\n    description = await analyzer(video_path=vp)\nexcept FileNotFoundError as e:\n    logger.error(f'bad video input: {e}')\n    raise InputValidationError('video_path') from e","preventionTips":["Always resolve to os.path.abspath and os.path.isfile before calling the analyzer","Download remote videos to temp files first and manage their lifecycle explicitly","Avoid temp cleanup between generation and analysis steps"],"tags":["file-not-found","input-validation","video-analysis"],"backgroundTag":"file-not-found","analyzedSha":"848b054e4fae40dabc62ec58e960b573e83793ac","analyzedAt":"2026-08-30T03:24:41.468Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}