run-llama/llama_index · error · NotImplementedError
Schema not implemented for SimplePropertyGraphStore.
Error message
Schema not implemented for SimplePropertyGraphStore.
What it means
SimplePropertyGraphStore.get_schema() unconditionally raises NotImplementedError — the class comment marks these as intentionally unimplemented methods. This in-memory property-graph store (nodes + weighted edges in a LabelledPropertyGraph model) supports persistence and triple-style accessors but not the schema introspection that graph-database backends provide.
Source
Thrown at llama-index-core/llama_index/core/graph_stores/simple_labelled.py:235
data["nodes"] = {}
# load the graph
graph = LabelledPropertyGraph.model_validate(data)
# add the node back
graph.nodes = kg_nodes
return cls(graph)
def to_dict(self) -> dict:
"""Convert to dict."""
return self.graph.model_dump()
# NOTE: Unimplemented methods for SimplePropertyGraphStore
def get_schema(self, refresh: bool = False) -> str:
"""Get the schema of the graph store."""
raise NotImplementedError(
"Schema not implemented for SimplePropertyGraphStore."
)
def structured_query(
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."
)View on GitHub (pinned to afd0fef371)
Solutions
- Use a schema-aware property graph backend (Neo4j, Neptune, Kuzu, TigerGraph integrations) when you need get_schema().
- Skip schema retrieval for this store: catch NotImplementedError or feature-check before calling, and build prompts from your own static schema description.
- Explore the graph via supported APIs (get/upsers of nodes and edges, triple accessors) instead.
Example fix
# before
schema = store.get_schema(refresh=True) # SimplePropertyGraphStore
# after
try:
schema = store.get_schema(refresh=True)
except NotImplementedError:
schema = MY_STATIC_SCHEMA_TEXT # describe entities/relations yourself Defensive patterns
Strategy: fallback
Validate before calling
from llama_index.core.graph_stores.simple_labelled import SimplePropertyGraphStore schema = None if isinstance(store, SimplePropertyGraphStore) else store.get_schema(refresh=True)
Type guard
def supports_schema(store) -> bool:
return not isinstance(store, SimplePropertyGraphStore) Try / catch
try:
schema = store.get_schema(refresh=True)
except NotImplementedError:
schema = STATIC_SCHEMA_DESCRIPTION # your own entity/relation summary Prevention
- Detect the store class before building schema-aware prompts.
- Provide a static schema string fallback for in-memory stores.
- Select a real property-graph backend if schema introspection is a hard requirement.
When it happens
Trigger: Calling get_schema() on a SimplePropertyGraphStore — most often from PropertyGraphIndex flows that build a schema-aware prompt, or generic code that was originally written against Neo4jPropertyGraphStore.
Common situations: Using SimplePropertyGraphStore as a zero-dependency default for PropertyGraphIndex and then enabling schema-based query generation; swapping the store backend via config without disabling schema prompts; agents that call get_schema() to orient themselves.
Related errors
- SimpleGraphStore does not support get_schema
- Structured query not implemented for SimplePropertyGraphStor
- SimpleGraphStore does not support query
- Vector query not implemented for SimplePropertyGraphStore.
- Client not implemented for SimplePropertyGraphStore.
AI-assisted analysis of run-llama/llama_index@afd0fef371 (2026-08-15).
Data as JSON: /api/errors/fcb387d3447a42c4.
Report an issue: GitHub.