HKUDS/nanobot · error · TypeError
ChannelPlugin.management.update_instance_config for '{plugin
Error message
ChannelPlugin.management.update_instance_config for '{plugin.name}' must return a dict What it means
Error "ChannelPlugin.management.update_instance_config for '{plugin.name}' must return a dict" thrown in HKUDS/nanobot.
Source
Thrown at nanobot/channels/contracts.py:434
copied_config[cast(str, key)] = value
return copied_config
def channel_update_instance_config(
plugin: ChannelPlugin,
section: Any,
values: dict[str, Any],
*,
instance_id: str = "default",
) -> dict[str, Any]:
updater = plugin.management.update_instance_config
if updater is None:
if instance_id not in {"", "default"}:
raise ValueError(f"{plugin.name} does not support multiple instances")
return values
updated = cast(object, updater(section, values, instance_id=instance_id))
if not isinstance(updated, dict):
raise TypeError(f"ChannelPlugin.management.update_instance_config for '{plugin.name}' must return a dict")
return cast(dict[str, Any], updated)
def channel_set_config_enabled(
plugin: ChannelPlugin,
section: Any,
enabled: bool,
*,
instance_id: str = "default",
) -> dict[str, Any]:
"""Toggle one instance while preserving channel-owned config shape."""
from nanobot.config.loader import merge_missing_defaults
values = channel_instance_config(plugin, section, instance_id=instance_id)
values = cast(dict[str, Any], merge_missing_defaults(values, channel_default_config(plugin)))
values["enabled"] = enabled
return channel_update_instance_config(
plugin,View on GitHub (pinned to 42f37dc4c0)
When it happens
Trigger: Thrown at nanobot/channels/contracts.py:434 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/34c29b9da9c68d94.
Report an issue: GitHub.