{"record":{"id":"43caa6b5edfa52db","repo":"ATH-MaaS/Pixelle-Video","slug":"the-workflow-file-does-not-exist-workflow-path-43caa6","errorCode":null,"errorMessage":"The workflow file does not exist: {workflow_path}","messagePattern":"The workflow file does not exist: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"web/pipelines/i2v.py","lineNumber":312,"sourceCode":"                                video_path=media_result.url,\n                                pipeline=\"image_to_video\",\n                                title=\"图生视频\" if get_language() == \"zh_CN\" else \"Image to Video\",\n                                input_params={\n                                    \"text\": prompt,\n                                    \"prompt_text\": prompt,\n                                    \"image_assets\": audio_assets,\n                                    \"workflow_key\": workflow_key,\n                                    \"api_video_params\": api_video_params,\n                                },\n                            )\n                            return media_result.url\n\n                        kit = await pixelle_video._get_or_create_comfykit()\n\n                        workflow_path = Path(\"workflows\") / workflow_key\n\n                        if not workflow_path.exists():\n                            raise Exception(f\"The workflow file does not exist: {workflow_path}\")\n\n                        with open(workflow_path, 'r', encoding='utf-8') as f:\n                            workflow_config = json.load(f)\n\n                        workflow_params = {\n                            \"image\": image_path,\n                            \"prompt\": prompt\n                        }\n\n                        if workflow_config.get(\"source\") == \"runninghub\" and \"workflow_id\" in workflow_config:\n                            workflow_input = workflow_config[\"workflow_id\"]\n                        else:\n                            workflow_input = str(workflow_path)\n\n                        video_result = await kit.execute(workflow_input, workflow_params)\n\n                        generated_video_url = None\n                        if hasattr(video_result, 'videos') and video_result.videos:","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/ATH-MaaS/Pixelle-Video/blob/848b054e4fae40dabc62ec58e960b573e83793ac/web/pipelines/i2v.py#L294-L330","documentation":"generate_audio_visual_video in web/pipelines/i2v.py resolves a workflow JSON under workflows/<workflow_key> and raises this Exception if the file does not exist, before attempting json.load. Fail-fast guard for a missing image-to-video workflow definition.","triggerScenarios":"workflow_key (chosen by the caller/UI, e.g. 'i2v_wan2_1.json') does not correspond to a file in the workflows/ directory at runtime — key typo, workflow file not deployed, relative path resolved against a different CWD, or file removed/renamed.","commonSituations":"Adding a new i2v workflow option in the UI without committing the JSON; Docker/volume mount omitting workflows/; running the web app from another directory so Path('workflows') is empty; case-sensitive Linux filesystem vs Windows-named files; selecting a model variant whose workflow file was never bundled.","solutions":["Check the path printed in the message; create or restore the missing workflow JSON there","Fix the workflow_key being passed to generate_audio_visual_video to match an existing file","Run from the repo root or anchor the path relative to the module: Path(__file__).parent / 'workflows'","List the workflows/ directory and align filenames/casing exactly with the keys used in code"],"exampleFix":"// before\nworkflow_path = Path(\"workflows\") / workflow_key\nif not workflow_path.exists():\n    raise Exception(f\"The workflow file does not exist: {workflow_path}\")\n// after\nWORKFLOWS_DIR = Path(__file__).resolve().parent.parent / \"workflows\"\nworkflow_path = WORKFLOWS_DIR / workflow_key\nif not workflow_path.is_file():\n    available = sorted(p.name for p in WORKFLOWS_DIR.glob(\"*.json\"))\n    raise FileNotFoundError(f\"Workflow file missing: {workflow_path}. Available: {available}\")","handlingStrategy":"validation","validationCode":"from pathlib import Path\nworkflow_path = Path(\"workflows\") / workflow_key\nif not workflow_key.endswith(\".json\") or not workflow_path.is_file():\n    raise FileNotFoundError(f\"Missing i2v workflow: {workflow_path.resolve()}\")","typeGuard":"def workflow_available(key: str, base: Path = Path(\"workflows\")) -> bool:\n    return (base / key).is_file()","tryCatchPattern":"try:\n    video = await generate_audio_visual_video(...)\nexcept Exception as e:\n    if \"workflow file does not exist\" in str(e):\n        log.error(\"i2v workflow asset missing: %s\", e)\n    raise","preventionTips":["Enumerate valid workflow keys from the workflows/ directory instead of hardcoding","Verify workflow files exist in the Docker image / deployment during CI","Resolve workflow paths relative to the package, not the process CWD","Validate the i2v workflow selection at UI/config load time"],"tags":["file-not-found","workflow-config","filesystem","i2v"],"backgroundTag":"workflow-file-not-found","analyzedSha":"848b054e4fae40dabc62ec58e960b573e83793ac","analyzedAt":"2026-08-30T03:24:41.468Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}