{"record":{"id":"59185b89cd2b1b1d","repo":"MemPalace/mempalace","slug":"palace-path","errorCode":null,"errorMessage":"{palace_path}","messagePattern":"\\{palace_path\\}","errorType":"exception","errorClass":"PalaceNotFoundError","httpStatus":null,"severity":"error","filePath":"mempalace/backends/chroma.py","lineNumber":2440,"sourceCode":"    ) -> ChromaCollection:\n        \"\"\"Obtain a collection for a palace.\n\n        Supports two calling conventions during the RFC 001 transition:\n\n        * New (preferred): ``get_collection(palace=PalaceRef, collection_name=...,\n          create=False, options=None)``.\n        * Legacy: ``get_collection(palace_path, collection_name, create=False)``\n          — still used by callers not yet migrated.\n        \"\"\"\n        palace_ref, collection_name, create, options = _normalize_get_collection_args(args, kwargs)\n        self.require_namespace_support(palace_ref)\n\n        palace_path = palace_ref.local_path\n        if palace_path is None:\n            raise PalaceNotFoundError(\"ChromaBackend requires PalaceRef.local_path\")\n\n        if not create and not os.path.isdir(palace_path):\n            raise PalaceNotFoundError(palace_path)\n\n        if create:\n            os.makedirs(palace_path, exist_ok=True)\n            try:\n                os.chmod(palace_path, 0o700)\n            except (OSError, NotImplementedError):\n                pass\n\n        client = self._client(palace_path)\n\n        ef = self._resolve_embedding_function()\n        ef_kwargs = {\"embedding_function\": ef} if ef is not None else {}\n\n        if create:\n            try:\n                collection = client.get_collection(collection_name, **ef_kwargs)\n            except _ChromaNotFoundError:\n                collection = client.create_collection(","sourceCodeStart":2422,"sourceCodeEnd":2458,"githubUrl":"https://github.com/MemPalace/mempalace/blob/06cb6987f02610784fefbad4b2bd5d026d164ba6/mempalace/backends/chroma.py#L2422-L2458","documentation":"A KeyError (with message) from get_adapter: the adapter class lookup failed while getting a long-lived cached instance. Functionally the same failure as get_adapter_class — unknown name after entry-point discovery — just surfaced on the instance-returning API used by mining code.","triggerScenarios":"Calling get_adapter(name) where name is not registered: typo in source configuration, or a plugin adapter whose package is missing from the environment.","commonSituations":"Source configs naming adapters after a plugin uninstall; CI environments without the optional extras installed; names drifted between mempalace versions.","solutions":["Validate against available_adapters() before calling; the message lists every registered name.","Install the package that registers the missing adapter and retry (discovery runs on each call).","Fix the adapter name in the configuration/source definition that produced it."],"exampleFix":"from mempalace.sources.registry import available_adapters\nadapters = available_adapters()\nif name not in adapters:\n    raise SystemExit(f'{name!r} not registered; have: {adapters}')\nadapter = get_adapter(name)","handlingStrategy":"validation","validationCode":"from mempalace.sources.registry import available_adapters\nassert name in available_adapters(), f'{name!r} not registered; have {available_adapters()}'","typeGuard":"def adapter_available(name: str) -> bool:\n    from mempalace.sources.registry import available_adapters\n    return name in available_adapters()","tryCatchPattern":"try:\n    adapter = get_adapter(name)\nexcept KeyError:\n    install_plugin_or_fallback(name)","preventionTips":["Run available_adapters() once at startup and validate every configured source.","Reinstall plugin packages (fresh entry-point metadata) after adding or upgrading them."],"tags":["plugins","registry","entry-points","validation"],"backgroundTag":null,"analyzedSha":"06cb6987f02610784fefbad4b2bd5d026d164ba6","analyzedAt":"2026-08-15T03:03:36.213Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}