OpenBMB/ChatDev · error · ConfigError
expected boolean
Error message
expected boolean
What it means
ValidationError raised when the parsed YAML document fails the server's check_config schema validation. The aggregated error list is embedded in the message so the client sees exactly which structural rules failed.
Source
Thrown at entity/configs/base.py:247
raise ConfigError("expected non-empty string", key_path)
return value
def optional_str(data: Mapping[str, Any], key: str, path: str) -> str | None:
value = data.get(key)
if value is None or value == "":
return None
key_path = f"{path}.{key}" if path else key
if not isinstance(value, str):
raise ConfigError("expected string", key_path)
return value
def require_bool(data: Mapping[str, Any], key: str, path: str) -> bool:
value = data.get(key)
key_path = f"{path}.{key}" if path else key
if not isinstance(value, bool):
raise ConfigError("expected boolean", key_path)
return value
def optional_bool(data: Mapping[str, Any], key: str, path: str, *, default: bool | None = None) -> bool | None:
if key not in data:
return default
value = data[key]
key_path = f"{path}.{key}" if path else key
if not isinstance(value, bool):
raise ConfigError("expected boolean", key_path)
return value
def optional_dict(data: Mapping[str, Any], key: str, path: str) -> Dict[str, Any] | None:
if key not in data or data[key] is None:
return None
value = data[key]
key_path = f"{path}.{key}" if path else keyView on GitHub (pinned to 4fb2db0ea9)
Solutions
- Read the embedded errors list in the message; each item names the failing rule.
- Fix the YAML structure per the errors and re-upload.
- Validate against check_config (or the published workflow schema) locally before uploading.
Example fix
# before
graph:
nodes: {}
# after (per reported errors, e.g. nodes must be a list)
graph:
nodes:
- id: start Defensive patterns
Strategy: validation
Validate before calling
const doc = jsYaml.load(content); const errors = await localCheckConfig(doc); // mirror server schema if (errors.length) showErrors(errors);
Try / catch
catch (e) { if (/YAML validation errors/.test(e.detail)) displayErrorList(e.detail); } Prevention
- Validate against the same schema locally before upload
- Show embedded error list to authors for fast iteration
When it happens
Trigger: Uploading syntactically valid YAML that violates the workflow schema: missing required graph keys, wrong node/edge structure, invalid field types — anything check_config reports.
Common situations: Hand-writing workflows without the schema at hand; version drift after the workflow schema changed; converting workflows from another format that drops required fields.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
AI-assisted analysis of OpenBMB/ChatDev@4fb2db0ea9 (2026-08-27).
Data as JSON: /api/errors/4ab764b54d661e80.
Report an issue: GitHub.