{"record":{"id":"fa62eaac8428ae56","repo":"OpenBMB/ChatDev","slug":"yaml-file-not-found-yaml-path-fa62ea","errorCode":null,"errorMessage":"YAML file not found: {yaml_path}","messagePattern":"YAML file not found: (.+?)","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"server/routes/execute_sync.py","lineNumber":83,"sourceCode":"    normalized_paths = [str(Path(path).expanduser()) for path in attachments]\n    return builder.build_from_file_paths(prompt, normalized_paths)\n\n\ndef _run_workflow_with_logger(\n    *,\n    yaml_file: Union[str, Path],\n    task_prompt: str,\n    attachments: Optional[Sequence[Union[str, Path]]],\n    session_name: Optional[str],\n    variables: Optional[dict],\n    log_level: Optional[LogLevel],\n    log_callback,\n) -> tuple[Optional[Message], dict[str, Any]]:\n    ensure_schema_registry_populated()\n\n    yaml_path = _resolve_yaml_path(yaml_file)\n    if not yaml_path.exists():\n        raise FileNotFoundError(f\"YAML file not found: {yaml_path}\")\n\n    attachments = attachments or []\n    if (not task_prompt or not task_prompt.strip()) and not attachments:\n        raise ValidationError(\n            \"Task prompt cannot be empty\",\n            details={\"task_prompt_provided\": bool(task_prompt)},\n        )\n\n    design = load_config(yaml_path, vars_override=variables)\n    normalized_session = _normalize_session_name(yaml_path, session_name)\n\n    graph_config = GraphConfig.from_definition(\n        design.graph,\n        name=normalized_session,\n        output_root=OUTPUT_ROOT,\n        source_path=str(yaml_path),\n        vars=design.vars,\n    )","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/OpenBMB/ChatDev/blob/4fb2db0ea90375ce1059f44fe03ffbd191a7a169/server/routes/execute_sync.py#L65-L101","documentation":"The synchronous workflow runner resolved yaml_file via _resolve_yaml_path and the resulting path does not exist on disk, so FileNotFoundError is raised before the workflow loads. This surfaces from the background worker, not as an HTTP error.","triggerScenarios":"POST /workflow/run (sync) with a yaml_file name that resolves to a nonexistent path: typo, file not yet uploaded, wrong working directory, or the file was deleted after submission.","commonSituations":"Relative YAML paths resolved against an unexpected CWD in containerized deployments; race between file upload and run start; stale references to renamed workflow files.","solutions":["Verify the YAML file exists at the resolved path shown in the error message","Use the same path form (absolute or the server-expected relative base) that other working runs use","Ensure file upload completes before triggering the sync run","Check the server's working directory / volume mounts if using relative paths"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import os\nresolved = resolve_yaml_path(yaml_file)  # mirror server resolution\nif not os.path.exists(resolved):\n    raise FileNotFoundError(f'upload/fix {resolved} before run')","typeGuard":null,"tryCatchPattern":"try:\n    client.run_workflow_sync(yaml_file=yaml_file, ...)\nexcept FileNotFoundError as e:\n    yaml_file = locate_and_upload(yaml_file)  # then retry","preventionTips":["Use absolute paths or the server-expected base for YAML files","Ensure uploads complete before triggering runs"],"tags":["file-not-found","workflow","yaml"],"backgroundTag":"file-not-found","analyzedSha":"4fb2db0ea90375ce1059f44fe03ffbd191a7a169","analyzedAt":"2026-08-27T14:35:29.622Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}