HKUDS/nanobot · error · TypeError

.PLUGIN webui entry does not exist

Error message

{module_name}.PLUGIN webui entry does not exist: {plugin.webui}

What it means

Existence validation in load_channel_package: PLUGIN.webui names a WebUI entry file that does not exist inside the channel package (after the earlier path-safety check passed). The manifest points at a file that was never created or is misnamed.

Solutions

  1. Create the WebUI entry file at the path declared in PLUGIN.webui
  2. Fix the webui path in manifest.py to match the actual file name/location
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at nanobot/channels/plugin.py:176 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/646af918bc99d9b3. Report an issue: GitHub.

Appendix: source

Thrown at nanobot/channels/plugin.py:176

            raise TypeError(
                f"{module_name}.PLUGIN {label} must stay inside {package_name}: "
                f"{target_module}"
            )
        target_parts = target_module.removeprefix(f"{package_name}.").split(".")
        target_file = package_root.joinpath(
            *target_parts[:-1],
            f"{target_parts[-1]}.py",
        )
        target_package = package_root.joinpath(*target_parts, "__init__.py")
        if not (target_file.is_file() or target_package.is_file()):
            raise TypeError(
                f"{module_name}.PLUGIN {label} module does not exist inside its package: "
                f"{target_module}"
            )
    if plugin.webui is not None:
        webui_entry = files("nanobot.channels").joinpath(name, *plugin.webui.split("/"))
        if not webui_entry.is_file():
            raise TypeError(
                f"{module_name}.PLUGIN webui entry does not exist: {plugin.webui}"
            )
    return plugin


__all__ = [
    "ChannelPlugin",
    "has_channel_package",
    "load_channel_package",
]

View on GitHub (pinned to 42f37dc4c0)