{"record":{"id":"7d7a922d4566ebe9","repo":"MemPalace/mempalace","slug":"marker-path-7d7a92","errorCode":null,"errorMessage":"{marker_path}","messagePattern":"\\{marker_path\\}","errorType":"exception","errorClass":"PalaceNotFoundError","httpStatus":null,"severity":"error","filePath":"mempalace/backends/qdrant.py","lineNumber":1347,"sourceCode":"        *args,\n        **kwargs,\n    ) -> QdrantCollection:\n        palace, collection_name, create, options = self._normalize_args(args, kwargs)\n        config = _QdrantConfig.from_options(options)\n        if palace.namespace and palace.namespace != config.namespace:\n            config = _QdrantConfig(\n                url=config.url,\n                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):","sourceCodeStart":1329,"sourceCodeEnd":1365,"githubUrl":"https://github.com/MemPalace/mempalace/blob/06cb6987f02610784fefbad4b2bd5d026d164ba6/mempalace/backends/qdrant.py#L1329-L1365","documentation":"Raised when opening a collection with create=False: the palace has a local path but the qdrant marker file does not exist there. The marker is the backend's proof that this palace was ever initialized with the qdrant backend; without it, open-for-read must fail rather than fabricate an empty collection view.","triggerScenarios":"get_collection(palace_ref_with_local_path, name, create=False) when <palace>/qdrant-marker.json is absent — e.g. a brand-new palace directory, a palace created by another backend, or a marker that was deleted.","commonSituations":"First use of a new palace directory without create=True; switching backends on an existing directory; marker removed by cleanup scripts or 'clean rebuild' attempts that expected the backend to recreate state.","solutions":["Open with create=True the first time you touch a palace with the qdrant backend","Verify you are pointing at the intended palace directory (typo'd/relative path)","If the palace was created with a different backend, open it with that backend instead"],"exampleFix":"// before\ncol = backend.get_collection(palace, \"drawers\")  # no marker -> PalaceNotFoundError\n// after\ncol = backend.get_collection(palace, \"drawers\", create=True)  # writes marker + creates remote","handlingStrategy":"validation","validationCode":"import os\ndef open_or_create(backend, palace, name):\n    marker = os.path.join(palace.local_path, \"qdrant-marker.json\")\n    return backend.get_collection(palace, name, create=not os.path.isfile(marker))","typeGuard":null,"tryCatchPattern":"from mempalace.backends.base import PalaceNotFoundError\ntry:\n    col = backend.get_collection(palace, name)\nexcept PalaceNotFoundError:\n    col = backend.get_collection(palace, name, create=True)","preventionTips":["Use create=True on first open of a new palace; use create=False thereafter to catch typos","Bootstrap palaces in an explicit init step at install time"],"tags":["qdrant","palace-not-found","marker","first-run"],"backgroundTag":null,"analyzedSha":"06cb6987f02610784fefbad4b2bd5d026d164ba6","analyzedAt":"2026-08-15T03:03:36.213Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}