{"record":{"id":"09e4cb8a1d02060b","repo":"run-llama/llama_index","slug":"the-installed-version-of-tree-sitter-language-pack","errorCode":null,"errorMessage":"The installed version of tree-sitter-language-pack is not compatible. Please install a compatible version: pip install 'tree-sitter-language-pack<1.0'","messagePattern":"The installed version of tree-sitter-language-pack is not compatible\\. Please install a compatible version: pip install 'tree-sitter-language-pack<1\\.0'","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/node_parser/text/code.py","lineNumber":131,"sourceCode":"            try:\n                import tree_sitter_language_pack  # pants: no-infer-dep\n\n                parser = tree_sitter_language_pack.get_parser(language)  # type: ignore\n            except ImportError:\n                raise ImportError(\n                    \"Please install tree_sitter_language_pack to use CodeSplitter.\"\n                    \"Or pass in a parser object.\"\n                )\n            except Exception:\n                print(\n                    f\"Could not get parser for language {language}. Check \"\n                    \"https://github.com/Goldziher/tree-sitter-language-pack?tab=readme-ov-file#available-languages \"\n                    \"for a list of valid languages.\"\n                )\n                raise\n\n        if not hasattr(parser, \"parse\"):\n            raise ImportError(\n                \"The installed version of tree-sitter-language-pack is not compatible. \"\n                \"Please install a compatible version: \"\n                \"pip install 'tree-sitter-language-pack<1.0'\"\n            )\n\n        self._parser = parser\n\n    @classmethod\n    def from_defaults(\n        cls,\n        language: str,\n        chunk_lines: int = DEFAULT_CHUNK_LINES,\n        chunk_lines_overlap: int = DEFAULT_LINES_OVERLAP,\n        max_chars: int = DEFAULT_MAX_CHARS,\n        count_mode: Literal[\"token\", \"char\"] = \"char\",\n        max_tokens: int = DEFAULT_MAX_TOKENS,\n        tokenizer: Optional[Callable] = None,\n        callback_manager: Optional[CallbackManager] = None,","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/node_parser/text/code.py#L113-L149","documentation":"Error \"The installed version of tree-sitter-language-pack is not compatible. Please install a compatible version: pip install 'tree-sitter-language-pack<1.0'\" thrown in run-llama/llama_index.","triggerScenarios":"Thrown at llama-index-core/llama_index/core/node_parser/text/code.py:131 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install a compatible version: `pip install 'tree-sitter-language-pack<1.0'`.","Pass an explicit parser object to CodeSplitter to bypass the version check."],"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"}