{"record":{"id":"fcb387d3447a42c4","repo":"run-llama/llama_index","slug":"schema-not-implemented-for-simplepropertygraphstor","errorCode":null,"errorMessage":"Schema not implemented for SimplePropertyGraphStore.","messagePattern":"Schema not implemented for SimplePropertyGraphStore\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/graph_stores/simple_labelled.py","lineNumber":235,"sourceCode":"        data[\"nodes\"] = {}\n\n        # load the graph\n        graph = LabelledPropertyGraph.model_validate(data)\n\n        # add the node back\n        graph.nodes = kg_nodes\n\n        return cls(graph)\n\n    def to_dict(self) -> dict:\n        \"\"\"Convert to dict.\"\"\"\n        return self.graph.model_dump()\n\n    # NOTE: Unimplemented methods for SimplePropertyGraphStore\n\n    def get_schema(self, refresh: bool = False) -> str:\n        \"\"\"Get the schema of the graph store.\"\"\"\n        raise NotImplementedError(\n            \"Schema not implemented for SimplePropertyGraphStore.\"\n        )\n\n    def structured_query(\n        self, query: str, param_map: Optional[Dict[str, Any]] = None\n    ) -> Any:\n        \"\"\"Query the graph store with statement and parameters.\"\"\"\n        raise NotImplementedError(\n            \"Structured query not implemented for SimplePropertyGraphStore.\"\n        )\n\n    def vector_query(\n        self, query: VectorStoreQuery, **kwargs: Any\n    ) -> Tuple[List[LabelledNode], List[float]]:\n        \"\"\"Query the graph store with a vector store query.\"\"\"\n        raise NotImplementedError(\n            \"Vector query not implemented for SimplePropertyGraphStore.\"\n        )","sourceCodeStart":217,"sourceCodeEnd":253,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/graph_stores/simple_labelled.py#L217-L253","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# before\nschema = store.get_schema(refresh=True)  # SimplePropertyGraphStore\n\n# after\ntry:\n    schema = store.get_schema(refresh=True)\nexcept NotImplementedError:\n    schema = MY_STATIC_SCHEMA_TEXT  # describe entities/relations yourself","handlingStrategy":"fallback","validationCode":"from llama_index.core.graph_stores.simple_labelled import SimplePropertyGraphStore\n\nschema = None if isinstance(store, SimplePropertyGraphStore) else store.get_schema(refresh=True)","typeGuard":"def supports_schema(store) -> bool:\n    return not isinstance(store, SimplePropertyGraphStore)","tryCatchPattern":"try:\n    schema = store.get_schema(refresh=True)\nexcept NotImplementedError:\n    schema = STATIC_SCHEMA_DESCRIPTION  # your own entity/relation summary","preventionTips":["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."],"tags":["not-implemented","property-graph","unsupported-operation","in-memory"],"backgroundTag":null,"analyzedSha":"afd0fef371831f9bda13e5af7167cf4e981278ab","analyzedAt":"2026-08-15T05:42:58.429Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}