{"record":{"id":"6c6433c604a91022","repo":"HKUDS/nanobot","slug":"channel-plugin-self-name-connector-self-conn-6c6433","errorCode":null,"errorMessage":"Channel plugin '{self.name}' connector '{self.connector}' does not provide handle()","messagePattern":"Channel plugin '(.+?)' connector '(.+?)' does not provide handle\\(\\)","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"nanobot/channels/plugin.py","lineNumber":109,"sourceCode":"            raise ImportError(\n                f\"Channel plugin '{self.name}' runtime declares name '{channel_cls.name}'\"\n            )\n        return channel_cls\n\n    def load_connector(self) -> Any:\n        \"\"\"Construct the optional channel-owned interactive connector.\"\"\"\n        if self.connector is None:\n            raise ImportError(f\"Channel plugin '{self.name}' does not provide a connector\")\n        module_name, attr_name = _target_parts(self.connector, label=\"connector\")\n        module = importlib.import_module(module_name)\n        factory = getattr(module, attr_name, None)\n        if not callable(factory):\n            raise ImportError(\n                f\"Channel plugin '{self.name}' connector '{self.connector}' is not callable\"\n            )\n        connector = factory()\n        if not callable(getattr(connector, \"handle\", None)):\n            raise ImportError(\n                f\"Channel plugin '{self.name}' connector '{self.connector}' \"\n                \"does not provide handle()\"\n            )\n        return connector\n\n\ndef _target_parts(target: str, *, label: str) -> tuple[str, str]:\n    module_name, separator, attr_name = target.partition(\":\")\n    if not separator or not module_name or not attr_name:\n        raise ValueError(f\"channel plugin {label} must use 'module:attribute' syntax\")\n    if not all(part.isidentifier() for part in module_name.split(\".\")):\n        raise ValueError(f\"channel plugin {label} module must be an absolute import path\")\n    if not attr_name.isidentifier():\n        raise ValueError(f\"channel plugin {label} attribute must be a Python identifier\")\n    return module_name, attr_name\n\n\ndef has_channel_package(name: str) -> bool:","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/channels/plugin.py#L91-L127","documentation":"Protocol validation in load_connector: the factory was called successfully, but the returned connector object has no callable handle() method, so it does not satisfy the interactive connector protocol the runtime expects to dispatch events to.","triggerScenarios":"Thrown at nanobot/channels/plugin.py:109 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Implement an async handle(...) method on the connector class returned by the factory","Ensure handle is an instance method (callable on the constructed object), not a module-level function"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"42f37dc4c0e409eac7818a82d165c5f2757bc075","analyzedAt":"2026-08-26T00:18:52.276Z","contentChangedAt":"2026-08-26T00:18:52.276Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}