HKUDS/nanobot · error · ImportError

Unknown channel: {name}

Error message

Unknown channel: {name}

What it means

Error "Unknown channel: {name}" thrown in HKUDS/nanobot.

Source

Thrown at nanobot/channels/registry.py:51

    """Load dependency-free descriptors from self-contained channel packages."""
    plugins: dict[str, ChannelPlugin] = {}
    for name in _channel_package_names():
        if enabled_names is not None and name not in enabled_names:
            continue
        try:
            plugin = load_channel_package(name)
            if plugin is not None:
                plugins[name] = plugin
        except Exception as exc:
            logger.warning("Failed to load channel package descriptor '{}': {}", name, exc)
    return plugins


def load_channel_plugin(name: str) -> ChannelPlugin:
    """Load one channel package descriptor."""
    plugin = discover_plugins({name}).get(name)
    if plugin is None:
        raise ImportError(f"Unknown channel: {name}")
    return plugin


def channel_default_enabled(name: str) -> bool:
    """Return the activation default declared by a channel descriptor."""
    try:
        return load_channel_plugin(name).default_enabled
    except ImportError:
        return False


def load_channel_class(name: str) -> type[BaseChannel]:
    """Load the runtime declared by one channel descriptor."""
    return load_channel_plugin(name).load_channel_class()


def discover_enabled(
    enabled_names: set[str],

View on GitHub (pinned to 42f37dc4c0)

When it happens

Trigger: Thrown at nanobot/channels/registry.py:51 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of HKUDS/nanobot@42f37dc4c0 (2026-08-26). Data as JSON: /api/errors/639de6344ecde529. Report an issue: GitHub.