OpenBMB/ChatDev · error · ConfigError

memory store payload missing

Error message

memory store payload missing

What it means

Raised by MemoryStoreConfig.require_payload when self.config is falsy — i.e. the store object was constructed programmatically without a config payload. from_dict enforces a config block, so hitting this usually means the dataclass was built directly in code.

Source

Thrown at entity/configs/node/memory.py:375

    @classmethod
    def from_dict(cls, data: Mapping[str, Any], *, path: str) -> "MemoryStoreConfig":
        mapping = require_mapping(data, path)
        name = require_str(mapping, "name", path)
        store_type = require_str(mapping, "type", path)
        try:
            schema = get_memory_store_schema(store_type)
        except SchemaLookupError as exc:
            raise ConfigError(f"unsupported memory store type '{store_type}'", extend_path(path, "type")) from exc

        if "config" not in mapping or mapping["config"] is None:
            raise ConfigError("memory store requires config block", extend_path(path, "config"))

        config_obj = schema.config_cls.from_dict(mapping["config"], path=extend_path(path, "config"))
        return cls(name=name, type=store_type, config=config_obj, path=path)

    def require_payload(self) -> BaseConfig:
        if not self.config:
            raise ConfigError("memory store payload missing", extend_path(self.path, "config"))
        return self.config

    FIELD_SPECS = {
        "name": ConfigFieldSpec(
            name="name",
            display_name="Store Name",
            type_hint="str",
            required=True,
            description="Unique name of the memory store",
        ),
        "type": ConfigFieldSpec(
            name="type",
            display_name="Store Type",
            type_hint="str",
            required=True,
            description="Memory store type",
        ),
        "config": ConfigFieldSpec(

View on GitHub (pinned to 4fb2db0ea9)

Solutions

  1. Always build memory store configs through from_dict so the config block is validated and stored
  2. If constructing manually, pass a valid config object (even an empty one) for the store type
  3. Guard calls to require_payload with a check on .config first

Example fix

# before
cfg = MemoryStoreConfig(name='s', type='redis', config=None)
payload = cfg.require_payload()
# after
cfg = MemoryStoreConfig.from_dict({'name':'s','type':'redis','config':{}}, path='store')
payload = cfg.require_payload()
Defensive patterns

Strategy: type-guard

Type guard

def has_store_payload(store) -> bool:
    return bool(getattr(store, 'config', None))

Try / catch

try:
    payload = store.require_payload()
except ConfigError:
    payload = default_store_payload()

Prevention

When it happens

Trigger: Constructing a memory store config object via its constructor (or a partial copy) with config=None, then calling require_payload().

Common situations: Programmatic construction or mocking of configs in tests; refactors that bypass from_dict; copying a store config and dropping the config attribute.

Related errors


AI-assisted analysis of OpenBMB/ChatDev@4fb2db0ea9 (2026-08-27). Data as JSON: /api/errors/a93958e509d766b3. Report an issue: GitHub.