{"record":{"id":"56b77305466ece46","repo":"MemPalace/mempalace","slug":"qdrant-backend-requires-a-local-palace-path-to-anc","errorCode":null,"errorMessage":"qdrant backend requires a local palace path to anchor mismatch protection; pure-remote palaces (local_path=None) are not supported yet","messagePattern":"qdrant backend requires a local palace path to anchor mismatch protection; pure-remote palaces \\(local_path=None\\) are not supported yet","errorType":"exception","errorClass":"BackendError","httpStatus":null,"severity":"error","filePath":"mempalace/backends/qdrant.py","lineNumber":1355,"sourceCode":"                api_key=config.api_key,\n                timeout=config.timeout,\n                namespace=palace.namespace,\n            )\n        client = self._client(config)\n        if palace.local_path:\n            marker_path = self._marker_path(palace.local_path)\n            if os.path.isfile(marker_path):\n                self._validate_marker_target(palace, config)\n            elif not create:\n                raise PalaceNotFoundError(marker_path)\n        else:\n            # The qdrant marker is this backend's only mismatch-protection\n            # anchor, and it lives next to the palace on local disk. With no\n            # local_path (the pure-remote / hosted mode) we can neither write\n            # nor validate it, so opening would silently drop protection\n            # against URL/namespace drift. Refuse loudly instead. A remote\n            # marker store for pure-remote palaces is tracked as a follow-up.\n            raise BackendError(\n                \"qdrant backend requires a local palace path to anchor mismatch \"\n                \"protection; pure-remote palaces (local_path=None) are not \"\n                \"supported yet\"\n            )\n        remote_collection = self._remote_collection_name(\n            palace=palace,\n            collection_name=collection_name,\n            config=config,\n        )\n        if not create and not client.collection_exists(remote_collection):\n            raise CollectionNotInitializedError(collection_name)\n        collection = QdrantCollection(\n            backend=self,\n            client=client,\n            config=config,\n            palace=palace,\n            collection_name=collection_name,\n            remote_collection=remote_collection,","sourceCodeStart":1337,"sourceCodeEnd":1373,"githubUrl":"https://github.com/MemPalace/mempalace/blob/06cb6987f02610784fefbad4b2bd5d026d164ba6/mempalace/backends/qdrant.py#L1337-L1373","documentation":"Raised when get_collection is called with a PalaceRef whose local_path is None (pure-remote/hosted mode). The qdrant backend's only mismatch-protection anchor is the on-disk marker; with no local path it can neither write nor validate it, so opening would silently drop protection against URL/namespace drift. Pure-remote palaces are explicitly not supported yet.","triggerScenarios":"Passing palace=PalaceRef(id=..., local_path=None) (or any PalaceRef without a local_path) to QdrantBackend.get_collection, with any create value.","commonSituations":"Trying to run mempalace fully remotely (no local palace directory) against hosted Qdrant; refactoring code that previously used string paths into PalaceRef objects and forgetting local_path; assuming a Chroma-style 'remote-only' workflow transfers to the qdrant backend.","solutions":["Give the PalaceRef a local_path — even a small scratch/state directory on the same machine — so the marker can be anchored there","Use a different backend (e.g. chromadb) if a local directory is truly unavailable","Wait for/follow up on the tracked remote marker store for pure-remote palaces mentioned in the error"],"exampleFix":"// before\npalace = PalaceRef(id=\"my-palace\", local_path=None)\ncol = backend.get_collection(palace=palace, collection_name=\"drawers\")  # raises\n// after\npalace = PalaceRef(id=\"my-palace\", local_path=\"~/.mempalace/palaces/my-palace\")\ncol = backend.get_collection(palace=palace, collection_name=\"drawers\")","handlingStrategy":"type-guard","validationCode":"if palace.local_path is None:\n    palace = PalaceRef(id=palace.id, local_path=default_state_dir(palace.id))","typeGuard":"def has_local_path(p: PalaceRef) -> bool:\n    \"\"\"True when the palace can anchor a qdrant marker on disk.\"\"\"\n    return isinstance(p, PalaceRef) and bool(p.local_path)","tryCatchPattern":null,"preventionTips":["Always construct PalaceRef with a concrete local_path","Centralize PalaceRef construction in one factory that enforces local_path"],"tags":["qdrant","pure-remote","unsupported","palaceref"],"backgroundTag":null,"analyzedSha":"06cb6987f02610784fefbad4b2bd5d026d164ba6","analyzedAt":"2026-08-15T03:03:36.213Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}