{"record":{"id":"b5cc2e926a5761b3","repo":"run-llama/llama_index","slug":"must-specify-node-parser-map-if-using-node-parser","errorCode":null,"errorMessage":"Must specify node_parser_map if using node_parser_ids.","messagePattern":"Must specify node_parser_map if using node_parser_ids\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/node_parser/relational/hierarchical.py","lineNumber":143,"sourceCode":"        if node_parser_ids is None:\n            if chunk_sizes is None:\n                chunk_sizes = [2048, 512, 128]\n\n            node_parser_ids = [f\"chunk_size_{chunk_size}\" for chunk_size in chunk_sizes]\n            node_parser_map = {}\n            for chunk_size, node_parser_id in zip(chunk_sizes, node_parser_ids):\n                node_parser_map[node_parser_id] = SentenceSplitter(\n                    chunk_size=chunk_size,\n                    callback_manager=callback_manager,\n                    chunk_overlap=chunk_overlap,\n                    include_metadata=include_metadata,\n                    include_prev_next_rel=include_prev_next_rel,\n                )\n        else:\n            if chunk_sizes is not None:\n                raise ValueError(\"Cannot specify both node_parser_ids and chunk_sizes.\")\n            if node_parser_map is None:\n                raise ValueError(\n                    \"Must specify node_parser_map if using node_parser_ids.\"\n                )\n\n        return cls(\n            chunk_sizes=chunk_sizes,\n            node_parser_ids=node_parser_ids,\n            node_parser_map=node_parser_map,\n            include_metadata=include_metadata,\n            include_prev_next_rel=include_prev_next_rel,\n            callback_manager=callback_manager,\n        )\n\n    @classmethod\n    def class_name(cls) -> str:\n        return \"HierarchicalNodeParser\"\n\n    def _recursively_get_nodes_from_nodes(\n        self,","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/node_parser/relational/hierarchical.py#L125-L161","documentation":"Error \"Must specify node_parser_map if using node_parser_ids.\" thrown in run-llama/llama_index.","triggerScenarios":"Thrown at llama-index-core/llama_index/core/node_parser/relational/hierarchical.py:143 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide node_parser_map mapping each id in node_parser_ids to a node parser.","Drop node_parser_ids and use chunk_sizes instead."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"afd0fef371831f9bda13e5af7167cf4e981278ab","analyzedAt":"2026-08-15T05:42:58.429Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}