{"record":{"id":"43a68ab706ebf224","repo":"HKUDS/nanobot","slug":"unable-to-read-the-file-sentence-detail","errorCode":null,"errorMessage":"Unable to read the file: {_sentence(detail)}","messagePattern":"Unable to read the file: (.+?)","errorType":"exception","errorClass":"ConfigLoadError","httpStatus":null,"severity":"error","filePath":"nanobot/config/loader.py","lineNumber":102,"sourceCode":"            data = json.load(handle)\n    except json.JSONDecodeError as exc:\n        raise ConfigLoadError(\n            path,\n            kind=\"invalid_json\",\n            summary=(\n                f\"JSON syntax error at line {exc.lineno}, column {exc.colno}: \"\n                f\"{_sentence(exc.msg)}\"\n            ),\n        ) from exc\n    except UnicodeDecodeError as exc:\n        raise ConfigLoadError(\n            path,\n            kind=\"io_error\",\n            summary=\"The file is not valid UTF-8.\",\n        ) from exc\n    except OSError as exc:\n        detail = exc.strerror or type(exc).__name__\n        raise ConfigLoadError(\n            path,\n            kind=\"io_error\",\n            summary=f\"Unable to read the file: {_sentence(detail)}\",\n        ) from exc\n\n    if not isinstance(data, dict):\n        root_type = type(data).__name__\n        raise ConfigLoadError(\n            path,\n            kind=\"invalid_root\",\n            summary=\"The top level of config.json must be a JSON object.\",\n            issues=(\n                ConfigIssue(\n                    path=(),\n                    message=f\"Expected an object, but found {root_type}.\",\n                ),\n            ),\n        )","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/config/loader.py#L84-L120","documentation":"Error \"Unable to read the file: {_sentence(detail)}\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/config/loader.py:102 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"}