{"record":{"id":"3c31077bfc6165c6","repo":"HKUDS/nanobot","slug":"found-len-missing-missing-environment-variable","errorCode":null,"errorMessage":"Found {len(missing)} missing environment variable reference(s).","messagePattern":"Found (.+?) missing environment variable reference\\(s\\)\\.","errorType":"exception","errorClass":"ConfigLoadError","httpStatus":null,"severity":"error","filePath":"nanobot/config/loader.py","lineNumber":209,"sourceCode":"\n\n_ENV_REF_PATTERN = re.compile(r\"\\$\\{([A-Za-z_][A-Za-z0-9_]*)\\}\")\n\n\ndef resolve_config_env_vars(\n    config: Config,\n    *,\n    config_path: Path | None = None,\n) -> Config:\n    \"\"\"Return *config* with ``${VAR}`` env-var references resolved.\n\n    Walks in place so fields declared with ``exclude=True`` survive;\n    returns the same instance when no references are present.\n    Raises ``ConfigLoadError`` if a referenced variable is not set.\n    \"\"\"\n    missing = tuple(_missing_env_issues(config))\n    if missing:\n        raise ConfigLoadError(\n            config_path or get_config_path(),\n            kind=\"missing_env\",\n            summary=f\"Found {len(missing)} missing environment variable reference(s).\",\n            issues=missing,\n        )\n    return _resolve_in_place(config)\n\n\n@overload\ndef resolve_env_refs(value: str) -> str: ...\n\n\n@overload\ndef resolve_env_refs(value: object) -> object: ...\n\n\ndef resolve_env_refs(value: object) -> object:\n    \"\"\"Resolve ``${VAR}`` references in a single string, leniently.","sourceCodeStart":191,"sourceCodeEnd":227,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/config/loader.py#L191-L227","documentation":"Error \"Found {len(missing)} missing environment variable reference(s).\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/config/loader.py:209 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"42f37dc4c0e409eac7818a82d165c5f2757bc075","analyzedAt":"2026-08-26T00:18:52.276Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}