HKUDS/nanobot · error · ValueError
channel plugin dependency is not a valid requirement: {depen
Error message
channel plugin dependency is not a valid requirement: {dependency} What it means
Error "channel plugin dependency is not a valid requirement: {dependency}" thrown in HKUDS/nanobot.
Source
Thrown at nanobot/channels/plugin.py:65
"digits, or underscores"
)
_target_parts(self.runtime, label="runtime")
if self.connector is not None:
_target_parts(self.connector, label="connector")
if self.setup is not None and not isinstance(cast(object, self.setup), ChannelSetupSpec):
raise TypeError("channel plugin setup must be a ChannelSetupSpec or None")
if not isinstance(cast(object, self.management), ChannelManagementSpec):
raise TypeError("channel plugin management must be a ChannelManagementSpec")
if not isinstance(cast(object, self.dependencies), tuple) or not all(
isinstance(cast(object, requirement), str) and requirement.strip()
for requirement in self.dependencies
):
raise TypeError("channel plugin dependencies must be a tuple of requirements")
for dependency in self.dependencies:
try:
Requirement(dependency)
except InvalidRequirement as exc:
raise ValueError(
f"channel plugin dependency is not a valid requirement: {dependency}"
) from exc
if self.webui is not None:
webui = self.webui.replace("\\", "/")
if webui.startswith("/") or ".." in webui.split("/"):
raise ValueError("channel plugin webui entry must stay inside its package")
object.__setattr__(self, "webui", webui)
def load_channel_class(self) -> type[BaseChannel]:
"""Resolve and validate the runtime class only when the channel is needed."""
from nanobot.channels.base import BaseChannel
module_name, _, attr_name = self.runtime.partition(":")
module = importlib.import_module(module_name)
channel_cls: Any = getattr(module, attr_name, None)
if (
not isinstance(channel_cls, type)
or not issubclass(channel_cls, BaseChannel)View on GitHub (pinned to 42f37dc4c0)
When it happens
Trigger: Thrown at nanobot/channels/plugin.py:65 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/c5c83f1f2d347063.
Report an issue: GitHub.