{"record":{"id":"2ec990dc9e09e323","repo":"langchain-ai/langgraph","slug":"namespace-cannot-be-empty","errorCode":null,"errorMessage":"Namespace cannot be empty.","messagePattern":"Namespace cannot be empty\\.","errorType":"validation","errorClass":"InvalidNamespaceError","httpStatus":null,"severity":"error","filePath":"libs/checkpoint/langgraph/checkpoint/store/base/__init__.py","lineNumber":1265,"sourceCode":"def _validate_namespace(namespace: tuple[str, ...]) -> None:\n    if not namespace:\n        raise InvalidNamespaceError(\"Namespace cannot be empty.\")\n    for label in namespace:\n        if not isinstance(label, str):\n            raise InvalidNamespaceError(\n                f\"Invalid namespace label '{label}' found in {namespace}. Namespace labels\"\n                f\" must be strings, but got {type(label).__name__}.\"\n            )","sourceCodeStart":null,"sourceCodeEnd":null,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/checkpoint/langgraph/checkpoint/store/base/__init__.py#L1265","documentation":"First check of the namespace validator _validate_namespace (shared by all BaseStore put/get/search calls): the namespace tuple is empty. Because namespaces are hierarchical paths ('('docs', 'user1')'), an empty tuple has no root label and cannot address any item, so it is rejected before any storage operation.","triggerScenarios":"Thrown at libs/checkpoint/langgraph/checkpoint/store/base/__init__.py:1265 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass at least one label, e.g. store.put(('memories', user_id), key, value)","Derive namespaces from a stable root like ('docs', thread_id) so they are never empty","Check for empty tuples from upstream logic (e.g. tuple(filter(...))) before calling the store"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","contentChangedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}