OpenBMB/ChatDev · error · DesignError
YAML root must be a mapping
Error message
YAML root must be a mapping
What it means
500 raised by the attachment upload endpoint when save_upload_file throws a non-validation exception (disk full, permission denied, storage backend outage). The original exception is logged with the session id before the generic message is returned.
Source
Thrown at check/check.py:66
)
def load_config(
config_path: Path,
*,
fn_module: Optional[str] = None,
set_defaults: bool = True,
vars_override: Optional[Dict[str, Any]] = None,
) -> DesignConfig:
"""Load, validate, and sanity-check a workflow file."""
try:
raw_data = read_yaml(config_path)
except FileNotFoundError as exc:
raise DesignError(f"Design file not found: {config_path}") from exc
if not isinstance(raw_data, dict):
raise DesignError("YAML root must be a mapping")
if vars_override:
merged_vars = dict(raw_data.get("vars") or {})
merged_vars.update(vars_override)
raw_data = dict(raw_data)
raw_data["vars"] = merged_vars
data = prepare_design_mapping(raw_data, source=str(config_path))
schema_errors = validate_design(data, set_defaults=set_defaults, fn_module_ref=fn_module)
if schema_errors:
formatted = "\n".join(f"- {err}" for err in schema_errors)
raise DesignError(f"Design validation failed for '{config_path}':\n{formatted}")
try:
design = DesignConfig.from_dict(data, path="root")
except ConfigError as exc:
raise DesignError(f"Design parsing failed for '{config_path}': {exc}") from excView on GitHub (pinned to 4fb2db0ea9)
Solutions
- Check server logs for the logged 'Failed to save attachment' entry with the real error string.
- Verify write permissions and free space on the upload storage directory.
- If storage is remote, verify connectivity/credentials and retry the upload.
Defensive patterns
Strategy: fallback
Try / catch
catch (e) { if (e.status === 500 && /attachment/i.test(e.detail)) notifyUser('storage issue, contact admin') } Prevention
- Monitor disk space on upload volumes
- Ensure server process owns the upload dir
When it happens
Trigger: Filesystem permission errors on the upload directory, disk exhaustion, or unexpected bugs in the attachment service while POSTing a multipart file to /api/uploads/{session_id}.
Common situations: Server runs as a user without write access to the storage dir; container with a full volume; NFS/S3-backed storage temporarily unavailable.
Related errors
- Design validation failed for '{config_path}': {formatted}
- Design parsing failed for '{config_path}': {exc}
- Design file not found: {config_path}
- No node types registered; cannot validate workflow
- Unsupported node type '{ntype}' for node '{nid}'. Only {allo
AI-assisted analysis of OpenBMB/ChatDev@4fb2db0ea9 (2026-08-27).
Data as JSON: /api/errors/7550fa479ea7ddc0.
Report an issue: GitHub.