{"record":{"id":"3b2126d338e47be8","repo":"HKUDS/nanobot","slug":"module-name-plugin-label-module-does-not-exist","errorCode":null,"errorMessage":"{module_name}.PLUGIN {label} module does not exist inside its package: {target_module}","messagePattern":"(.+?)\\.PLUGIN (.+?) module does not exist inside its package: (.+?)","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"nanobot/channels/plugin.py","lineNumber":169,"sourceCode":"    package_root = files(\"nanobot.channels\").joinpath(name)\n    targets = [(\"runtime\", plugin.runtime)]\n    if plugin.connector is not None:\n        targets.append((\"connector\", plugin.connector))\n    for label, target in targets:\n        target_module, _ = _target_parts(target, label=label)\n        if not target_module.startswith(f\"{package_name}.\"):\n            raise TypeError(\n                f\"{module_name}.PLUGIN {label} must stay inside {package_name}: \"\n                f\"{target_module}\"\n            )\n        target_parts = target_module.removeprefix(f\"{package_name}.\").split(\".\")\n        target_file = package_root.joinpath(\n            *target_parts[:-1],\n            f\"{target_parts[-1]}.py\",\n        )\n        target_package = package_root.joinpath(*target_parts, \"__init__.py\")\n        if not (target_file.is_file() or target_package.is_file()):\n            raise TypeError(\n                f\"{module_name}.PLUGIN {label} module does not exist inside its package: \"\n                f\"{target_module}\"\n            )\n    if plugin.webui is not None:\n        webui_entry = files(\"nanobot.channels\").joinpath(name, *plugin.webui.split(\"/\"))\n        if not webui_entry.is_file():\n            raise TypeError(\n                f\"{module_name}.PLUGIN webui entry does not exist: {plugin.webui}\"\n            )\n    return plugin\n\n\n__all__ = [\n    \"ChannelPlugin\",\n    \"has_channel_package\",\n    \"load_channel_package\",\n]\n","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/channels/plugin.py#L151-L187","documentation":"Existence validation in load_channel_package: the target module path stays inside the channel package, but neither the corresponding .py file nor a package __init__.py exists on disk, so the runtime/connector could never be imported. Typically a typo in the module name or a missing file in the shipped package.","triggerScenarios":"Thrown at nanobot/channels/plugin.py:169 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the missing module file under nanobot/channels/<name>/ or fix the module name in the manifest target","Ensure the file is included when the package/wheel is built (check packaging excludes)"],"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"}