run-llama/llama_index · error · NotImplementedError

Use subclasses of MutableMappingKVStore (such as SimpleKVSto

Error message

Use subclasses of MutableMappingKVStore (such as SimpleKVStore) to call this method

What it means

Error "Use subclasses of MutableMappingKVStore (such as SimpleKVStore) to call this method" thrown in run-llama/llama_index.

Source

Thrown at llama-index-core/llama_index/core/storage/kvstore/types.py:174

    def delete(self, key: str, collection: str = DEFAULT_COLLECTION) -> bool:
        """Delete a value from the store."""
        try:
            self._get_collection_mapping(collection).pop(key)
            return True
        except KeyError:
            return False

    async def adelete(self, key: str, collection: str = DEFAULT_COLLECTION) -> bool:
        """Delete a value from the store."""
        return self.delete(key, collection=collection)

    # this method is here to avoid TypeChecker shows an error
    def persist(
        self, persist_path: str, fs: Optional[fsspec.AbstractFileSystem] = None
    ) -> None:
        """Persist the store."""
        raise NotImplementedError(
            "Use subclasses of MutableMappingKVStore (such as SimpleKVStore) to call this method"
        )

    # this method is here to avoid TypeChecker shows an error
    def from_persist_path(cls, persist_path: str) -> "MutableMappingKVStore":
        """Create a MutableMappingKVStore from a persist directory."""
        raise NotImplementedError(
            "Use subclasses of MutableMappingKVStore (such as SimpleKVStore) to call this method"
        )

View on GitHub (pinned to afd0fef371)

Solutions

  1. Use a MutableMappingKVStore subclass such as SimpleKVStore for this method.
  2. Avoid calling this method on kvstores that do not expose the mapping interface.

When it happens

Trigger: Thrown at llama-index-core/llama_index/core/storage/kvstore/types.py:174 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of run-llama/llama_index@afd0fef371 (2026-08-15). Data as JSON: /api/errors/b883cddba4e1cf75. Report an issue: GitHub.