HKUDS/DeepTutor · warning · HubError

{self.name}: this hub does not support search.

Error message

{self.name}: this hub does not support search.

What it means

Raised by CommandProvider.search — command-based hubs (type "command" in settings) have no HTTP search API, only a fetch command. Any search() call on such a provider is unsupported by design.

Source

Thrown at deeptutor/services/skill/hub.py:562

            return {}


class CommandProvider:
    """Generic fetch-by-command provider for registries without a public API.

    The configured ``fetch_cmd`` template receives ``{slug}``, ``{version}``
    (empty string when unpinned) and ``{dest}`` — it must leave the package
    (a ``SKILL.md`` tree, or a zip we can extract) under ``{dest}``. The
    command runs without a shell; pipes and substitutions won't work, which
    is the point.
    """

    def __init__(self, name: str, *, fetch_cmd: str) -> None:
        self.name = name
        self._fetch_cmd = fetch_cmd

    def search(self, query: str, *, limit: int = 10) -> list[HubSkillRef]:
        raise HubError(f"{self.name}: this hub does not support search.")

    def verify(self, slug: str, *, version: str | None = None) -> HubVerdict:
        return HubVerdict(status="unknown", detail="command hubs have no verdict API")

    def fetch(self, slug: str, *, version: str | None = None) -> FetchedSkill:
        tmp = Path(tempfile.mkdtemp(prefix="deeptutor-skill-"))
        dest = tmp / "fetched"
        dest.mkdir()
        argv = [
            part.format(slug=slug, version=version or "", dest=str(dest))
            for part in shlex.split(self._fetch_cmd)
        ]
        try:
            completed = subprocess.run(
                argv,
                cwd=str(tmp),
                capture_output=True,
                text=True,

View on GitHub (pinned to 3e82f13042)

Solutions

  1. Search a different hub that supports search (e.g. the default clawhub)
  2. Guard with hasattr/provider capability checks before calling search
  3. Switch the hub type back to clawhub if the hub actually has an HTTP API
  4. For command hubs, browse slugs out-of-band (e.g. the command's own docs)

Example fix

# before
hub = get_hub_provider('mycmdhub')
hub.search('query')  # raises
# after
hub = get_hub_provider('clawhub')
hub.search('query')
Defensive patterns

Strategy: type-guard

Validate before calling

provider = get_hub_provider(hub)
if not hasattr(provider, 'search') or type(provider).__name__ == 'CommandProvider':
    raise SystemExit(f'{hub} cannot search; use a clawhub-type hub')

Type guard

def supports_search(p) -> bool:
    from deeptutor.services.skill.hub import CommandProvider
    return not isinstance(p, CommandProvider)

Try / catch

try:
    hub.search(q)
except HubError as e:
    if "does not support search" in str(e): use_default_hub()
    else: raise

Prevention

When it happens

Trigger: Configuring a hub entry with "type": "command" and then calling skill_search / hub.search against that hub name, or running `skill search --hub <command-hub>`.

Common situations: Switching a hub config from clawhub to command and forgetting search no longer works; scripts assuming every provider implements search.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27). Data as JSON: /api/errors/29b6a0353d218c0e. Report an issue: GitHub.