MemPalace/mempalace · error · UnknownSourceAdapterError

unknown source adapter {adapter_name!r}; install its adapter

Error message

unknown source adapter {adapter_name!r}; install its adapter package or check the adapter name with `mempalace mine --help`

What it means

Raised by `mempalace mine` in cli.py: the source adapter name resolved for your source is not registered by `get_adapter` (KeyError wrapped into this error). Adapters are plugins — an unknown name means the adapter package is not installed, was renamed, or the name was misspelled.

Source

Thrown at mempalace/cli.py:949

    miners.  Until those miners are migrated to first-party adapters, no-flag
    and ``--mode`` calls must retain their established dispatch paths.
    """
    from .knowledge_graph import KnowledgeGraph
    from .palace import get_collection, mine_palace_lock
    from .sources import (
        DrawerRecord,
        PalaceContext,
        SourceRef,
        SourceItemMetadata,
        get_adapter,
        resolve_adapter_for_source,
    )

    adapter_name = resolve_adapter_for_source(explicit=source_name)
    try:
        adapter = get_adapter(adapter_name)
    except KeyError as exc:
        raise UnknownSourceAdapterError(
            f"unknown source adapter {adapter_name!r}; install its adapter package or "
            "check the adapter name with `mempalace mine --help`"
        ) from exc

    if "supports_incremental" in adapter.capabilities:
        raise UnsupportedSourceAdapterProtocolError(
            f"source adapter {adapter_name!r} requires incremental ingestion, which "
            "mempalace mine does not support yet"
        )

    # A dry run must never open a collection: backend opens can create or
    # repair storage even when requested as read-only.  Non-dry runs hold one
    # writer lease from handle creation through adapter iteration, including
    # direct KG mutations by adapters.
    lock = mine_palace_lock(palace_path) if not dry_run else contextlib.nullcontext()
    with lock:
        knowledge_graph = None
        try:

View on GitHub (pinned to 06cb6987f0)

Solutions

  1. Run `mempalace mine --help` and use the exact adapter name it lists.
  2. Install the adapter's package/extra for your source (e.g. `uv sync --extra <adapter>` or `pip install mempalace[<adapter>]`).
  3. If inference picked the wrong name, pass the adapter explicitly via the source flag instead of relying on auto-detection.
  4. After upgrading mempalace, re-check the adapter list — names change between versions.

Example fix

# before
mempalace mine --source slack   # adapter package not installed / wrong name

# after
mempalace mine --help            # confirm exact adapter name
uv sync --extra slack            # install the adapter
mempalace mine --source slack
Defensive patterns

Strategy: validation

Validate before calling

from mempalace.adapters import get_adapter  # registry

def adapter_available(name) -> bool:
    try:
        get_adapter(name)
        return True
    except KeyError:
        return False

Try / catch

try:
    run_mine(source="slack", ...)
except UnknownSourceAdapterError as e:
    raise SystemExit(f"{e}. Run `mempalace mine --help` and install the adapter extra.") from e

Prevention

When it happens

Trigger: Running `mempalace mine --source <name>` (or letting `resolve_adapter_for_source` infer from explicit=) where `<name>` is not in the adapter registry — e.g. `--source slack` when the Slack adapter package was never installed, or a typo like `--source gdrive` vs `--source googledrive`.

Common situations: New install missing optional adapter extras (`pip install mempalace[slack]` not run); adapter renamed across versions; CI environment with fewer extras than the developer's machine; the source auto-detection inferring a name with no installed adapter.

Related errors


AI-assisted analysis of MemPalace/mempalace@06cb6987f0 (2026-08-15). Data as JSON: /api/errors/4e617178c94314b1. Report an issue: GitHub.