HKUDS/nanobot · error · ConfigLoadError
Environment-based configuration could not be parsed. Check…
Error message
Environment-based configuration could not be parsed. Check that complex NANOBOT_* values use valid JSON.
What it means
In load_config, no config file exists so a default Config() is built from environment variables, but pydantic-settings raised SettingsError — complex NANOBOT_* environment values are not parseable JSON. This is a generic guard on env-based startup only; the input at fault is an unparseable NANOBOT_* env var value.
Solutions
- Ensure complex NANOBOT_* env values (lists/objects) are valid JSON, e.g. NANOBOT_TOOLS='["web"]'
- Unset the offending env var to use built-in defaults
- Create a config file instead of env-based configuration
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at nanobot/config/loader.py:63 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of HKUDS/nanobot@42f37dc4c0 (2026-08-26).
Data as JSON: /api/errors/dfc5e769fc491531.
Report an issue: GitHub.
Appendix: source
Thrown at nanobot/config/loader.py:63
Args:
config_path: Optional path to config file. Uses default if not provided.
Returns:
Loaded configuration object.
"""
global _schema_refs_ready
if not _schema_refs_ready:
_resolve_tool_config_refs()
_schema_refs_ready = True
path = config_path or get_config_path()
if not path.exists():
try:
config = Config()
except SettingsError as exc:
raise ConfigLoadError(
path,
kind="invalid_schema",
summary=(
"Environment-based configuration could not be parsed. "
"Check that complex NANOBOT_* values use valid JSON."
),
) from exc
except ValidationError as exc:
raise ConfigLoadError(
path,
kind="invalid_schema",
summary="Environment-based configuration is invalid.",
issues=validation_issues(exc),
) from exc
config.bind_source_path(path)
_apply_ssrf_whitelist(config)
return config
View on GitHub (pinned to 42f37dc4c0)