{"record":{"id":"75f095e7c9058af3","repo":"ATH-MaaS/Pixelle-Video","slug":"audio-path","errorCode":null,"errorMessage":"驱动音频不存在: {audio_path}","messagePattern":"驱动音频不存在: (.+?)","errorType":"validation","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"pixelle_video/services/api_services/video_dashscope.py","lineNumber":196,"sourceCode":"\n        if image_path and not os.path.exists(image_path):\n            raise FileNotFoundError(f\"输入图片不存在: {image_path}\")\n        if last_image_path and not os.path.exists(last_image_path):\n            raise FileNotFoundError(f\"尾帧图片不存在: {last_image_path}\")\n        if first_clip_path and not os.path.exists(first_clip_path):\n            raise FileNotFoundError(f\"输入视频片段不存在: {first_clip_path}\")\n        if reference_image_path and not os.path.exists(reference_image_path):\n            raise FileNotFoundError(f\"参考图片不存在: {reference_image_path}\")\n        for ref_image_path in reference_image_paths or []:\n            if ref_image_path and not os.path.exists(ref_image_path):\n                raise FileNotFoundError(f\"参考图片不存在: {ref_image_path}\")\n        for ref_video_path in reference_video_paths or []:\n            if ref_video_path and not os.path.exists(ref_video_path):\n                raise FileNotFoundError(f\"参考视频不存在: {ref_video_path}\")\n        if reference_audio_path and not os.path.exists(reference_audio_path):\n            raise FileNotFoundError(f\"参考音频不存在: {reference_audio_path}\")\n        if audio_path and not os.path.exists(audio_path):\n            raise FileNotFoundError(f\"驱动音频不存在: {audio_path}\")\n\n        logger.info(f\"DashscopeVideoClient: model={model}, prompt={prompt[:60]}...\")\n\n        if self._is_text_to_video_model(model):\n            call_kwargs = {\n                \"api_key\": self.api_key,\n                \"model\": model,\n                \"prompt\": prompt,\n                \"duration\": duration,\n                \"watermark\": watermark,\n            }\n            if negative_prompt:\n                call_kwargs[\"negative_prompt\"] = negative_prompt\n            if resolution:\n                call_kwargs[\"resolution\"] = resolution\n            if video_ratio:\n                call_kwargs[\"ratio\"] = video_ratio\n            if prompt_extend is not None:","sourceCodeStart":178,"sourceCodeEnd":214,"githubUrl":"https://github.com/ATH-MaaS/Pixelle-Video/blob/848b054e4fae40dabc62ec58e960b573e83793ac/pixelle_video/services/api_services/video_dashscope.py#L178-L214","documentation":"generate_video() checks that the driving audio file audio_path (the audio that the generated video/lip-sync will be driven by) exists on disk. If not, FileNotFoundError is raised with the path before any API call. None/empty values are allowed (feature disabled).","triggerScenarios":"generate_video() called with audio_path set to a non-empty string whose file does not exist.","commonSituations":"Audio pipeline wrote to a different directory; temp file cleanup raced the call; absolute path from another host baked into config; running in container without the mount; renamed or moved asset.","solutions":["Check os.path.isfile(audio_path) from the same process before calling generate_video.","Use absolute paths anchored to the service's base directory.","Fix the upstream audio rendering step to write/flush the file before generate_video is invoked.","Ensure the path is accessible inside the container/VM running the service."],"exampleFix":"// before\nclient.generate_video(prompt=p, audio_path=clip_audio)\n// after\nif clip_audio and not os.path.isfile(clip_audio):\n    raise FileNotFoundError(f\"drive audio missing: {clip_audio}\")\nclient.generate_video(prompt=p, audio_path=os.path.abspath(clip_audio))","handlingStrategy":"validation","validationCode":"if audio_path and not os.path.isfile(audio_path):\n    raise FileNotFoundError(f\"drive audio missing: {audio_path}\")","typeGuard":"def has_drive_audio(p: str | None) -> bool:\n    return p is None or os.path.isfile(p)","tryCatchPattern":"try:\n    client.generate_video(prompt=p, audio_path=audio)\nexcept FileNotFoundError as e:\n    logger.error(\"drive audio missing: %s\", e)\n    raise","preventionTips":["Check the audio file exists immediately after producing it.","Use os.path.abspath / normpath before storing paths in config.","Avoid temp dirs with aggressive cleanup; use a durable workspace dir.","Validate all input paths once at pipeline start, not at API-call time."],"tags":["file-not-found","path-validation","audio"],"backgroundTag":"file-not-found","analyzedSha":"848b054e4fae40dabc62ec58e960b573e83793ac","analyzedAt":"2026-08-30T03:24:41.468Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}