run-llama/llama_index · error · NotImplementedError
Client not implemented for SimplePropertyGraphStore.
Error message
Client not implemented for SimplePropertyGraphStore.
What it means
The client property on SimplePropertyGraphStore is declared to satisfy the PropertyGraphStore interface but raises NotImplementedError because an in-memory dict-based store has no database client to expose. Accessing .client raises immediately rather than returning None, so introspection code that touches store.client fails loudly.
Source
Thrown at llama-index-core/llama_index/core/graph_stores/simple_labelled.py:258
self, query: str, param_map: Optional[Dict[str, Any]] = None
) -> Any:
"""Query the graph store with statement and parameters."""
raise NotImplementedError(
"Structured query not implemented for SimplePropertyGraphStore."
)
def vector_query(
self, query: VectorStoreQuery, **kwargs: Any
) -> Tuple[List[LabelledNode], List[float]]:
"""Query the graph store with a vector store query."""
raise NotImplementedError(
"Vector query not implemented for SimplePropertyGraphStore."
)
@property
def client(self) -> Any:
"""Get client."""
raise NotImplementedError(
"Client not implemented for SimplePropertyGraphStore."
)
def save_networkx_graph(self, name: str = "kg.html") -> None:
"""Display the graph store, useful for debugging."""
import networkx as nx
G = nx.DiGraph()
for node in self.graph.nodes.values():
G.add_node(node.id, label=node.id)
for triplet in self.graph.triplets:
G.add_edge(triplet[0], triplet[2], label=triplet[1])
# save to html file
from pyvis.network import Network
net = Network(notebook=False, directed=True)
net.from_nx(G)View on GitHub (pinned to afd0fef371)
Solutions
- Use a real backend store (Neo4j, Kuzu, FalkorDB) if you need the underlying database client.
- Guard access with hasattr/try-except if you only want a client when one exists.
- Use the store's public Python API (get, get_triplets, etc.) instead of reaching through .client.
- If you just need to run raw queries, note that structured_query is also unimplemented on this store — the simple store is data-only.
Example fix
# before client = index.property_graph_store.client # NotImplementedError # after store = index.property_graph_store client = getattr(store, "client", None) if type(store).__name__ != "SimplePropertyGraphStore" else None
Defensive patterns
Strategy: type-guard
Validate before calling
has_client = hasattr(type(store), 'client') and not getattr(type(store).client, '_is_not_implemented', False) # simplest: check concrete type from llama_index.core.graph_stores import SimplePropertyGraphStore has_client = not isinstance(store, SimplePropertyGraphStore)
Type guard
def has_backend_client(store) -> bool:
try:
store.client
return True
except NotImplementedError:
return False Try / catch
try:
client = store.client
except NotImplementedError:
client = None # in-memory store; use Python API instead Prevention
- Treat .client as optional on PropertyGraphStore implementations.
- Prefer the store's abstract API (get/get_triplets) over reaching into backend clients.
When it happens
Trigger: Accessing simple_store.client; generic diagnostics or admin tooling that iterates graph stores and reads .client; attempting to pass the store's client to another library (e.g. running raw Cypher via the underlying driver).
Common situations: Porting code written against Neo4jPropertyGraphStore (where .client is a Neo4j Driver) to the default simple store; notebook inspection of the store object; feature-detection code that assumes client is always present.
Related errors
- Vector query not implemented for SimplePropertyGraphStore.
- SimpleGraphStore does not support get_schema
- SimpleGraphStore does not support query
- Schema not implemented for SimplePropertyGraphStore.
- Structured query not implemented for SimplePropertyGraphStor
AI-assisted analysis of run-llama/llama_index@afd0fef371 (2026-08-15).
Data as JSON: /api/errors/53c227a3d595684e.
Report an issue: GitHub.