MemPalace/mempalace · error · KeyError
unknown source adapter {name!r}; available: {sorted(_registr
Error message
unknown source adapter {name!r}; available: {sorted(_registry.keys())} What it means
Error "unknown source adapter {name!r}; available: {sorted(_registry.keys())}" thrown in MemPalace/mempalace.
Source
Thrown at mempalace/sources/registry.py:124
return _registry[name]
except KeyError as e:
raise KeyError(f"unknown source adapter {name!r}; available: {available_adapters()}") from e
def get_adapter(name: str) -> BaseSourceAdapter:
"""Return a long-lived instance of the named adapter.
Instances are cached per-name; repeated calls return the same object.
Call :func:`reset_adapters` in tests that need isolation.
"""
_discover_entry_points()
with _lock:
inst = _instances.get(name)
if inst is not None:
return inst
cls = _registry.get(name)
if cls is None:
raise KeyError(
f"unknown source adapter {name!r}; available: {sorted(_registry.keys())}"
)
inst = cls()
_instances[name] = inst
return inst
def reset_adapters() -> None:
"""Close and drop all cached adapter instances (primarily for tests)."""
with _lock:
for inst in _instances.values():
try:
inst.close()
except Exception:
logger.exception("error closing adapter during reset")
_instances.clear()
View on GitHub (pinned to 06cb6987f0)
Solutions
- Choose one of the listed registered adapters
When it happens
Trigger: Thrown at mempalace/sources/registry.py:124 when the library encounters an invalid state.
Common situations: Adapter name not present in the registry.
AI-assisted analysis of MemPalace/mempalace@06cb6987f0 (2026-08-15).
Data as JSON: /api/errors/987f62809eaf6eb8.
Report an issue: GitHub.