OpenBMB/ChatDev · error · FileNotFoundError
YAML file not found: {yaml_path}
Error message
YAML file not found: {yaml_path} What it means
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.
Source
Thrown at server/routes/execute_sync.py:83
normalized_paths = [str(Path(path).expanduser()) for path in attachments]
return builder.build_from_file_paths(prompt, normalized_paths)
def _run_workflow_with_logger(
*,
yaml_file: Union[str, Path],
task_prompt: str,
attachments: Optional[Sequence[Union[str, Path]]],
session_name: Optional[str],
variables: Optional[dict],
log_level: Optional[LogLevel],
log_callback,
) -> tuple[Optional[Message], dict[str, Any]]:
ensure_schema_registry_populated()
yaml_path = _resolve_yaml_path(yaml_file)
if not yaml_path.exists():
raise FileNotFoundError(f"YAML file not found: {yaml_path}")
attachments = attachments or []
if (not task_prompt or not task_prompt.strip()) and not attachments:
raise ValidationError(
"Task prompt cannot be empty",
details={"task_prompt_provided": bool(task_prompt)},
)
design = load_config(yaml_path, vars_override=variables)
normalized_session = _normalize_session_name(yaml_path, session_name)
graph_config = GraphConfig.from_definition(
design.graph,
name=normalized_session,
output_root=OUTPUT_ROOT,
source_path=str(yaml_path),
vars=design.vars,
)View on GitHub (pinned to 4fb2db0ea9)
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
Defensive patterns
Strategy: validation
Validate before calling
import os
resolved = resolve_yaml_path(yaml_file) # mirror server resolution
if not os.path.exists(resolved):
raise FileNotFoundError(f'upload/fix {resolved} before run') Try / catch
try:
client.run_workflow_sync(yaml_file=yaml_file, ...)
except FileNotFoundError as e:
yaml_file = locate_and_upload(yaml_file) # then retry Prevention
- Use absolute paths or the server-expected base for YAML files
- Ensure uploads complete before triggering runs
When it happens
Trigger: 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.
Common situations: Relative YAML paths resolved against an unexpected CWD in containerized deployments; race between file upload and run start; stale references to renamed workflow files.
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 OpenBMB/ChatDev@4fb2db0ea9 (2026-08-27).
Data as JSON: /api/errors/fa62eaac8428ae56.
Report an issue: GitHub.