{"record":{"id":"526a7486f12148df","repo":"run-llama/llama_index","slug":"you-must-install-the-unstructured-and-lxml-pac","errorCode":null,"errorMessage":"You must install the `unstructured` and `lxml` package to use this node parser.","messagePattern":"You must install the `unstructured` and `lxml` package to use this node parser\\.","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/node_parser/relational/unstructured_element.py","lineNumber":44,"sourceCode":"\n    partitioning_parameters: Optional[Dict[str, Any]] = Field(\n        default={},\n        description=\"Extra dictionary representing parameters of the partitioning process.\",\n    )\n\n    def __init__(\n        self,\n        callback_manager: Optional[CallbackManager] = None,\n        llm: Optional[Any] = None,\n        summary_query_str: str = DEFAULT_SUMMARY_QUERY_STR,\n        partitioning_parameters: Optional[Dict[str, Any]] = {},\n    ) -> None:\n        \"\"\"Initialize.\"\"\"\n        try:\n            import lxml  # noqa  # pants: no-infer-dep\n            import unstructured  # noqa  # pants: no-infer-dep\n        except ImportError:\n            raise ImportError(\n                \"You must install the `unstructured` and `lxml` \"\n                \"package to use this node parser.\"\n            )\n        callback_manager = callback_manager or CallbackManager([])\n\n        return super().__init__(\n            callback_manager=callback_manager,\n            llm=llm,\n            summary_query_str=summary_query_str,\n            partitioning_parameters=partitioning_parameters,\n        )\n\n    @classmethod\n    def class_name(cls) -> str:\n        return \"UnstructuredElementNodeParser\"\n\n    def get_nodes_from_node(self, node: TextNode) -> List[BaseNode]:\n        \"\"\"Get nodes from node.\"\"\"","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/node_parser/relational/unstructured_element.py#L26-L62","documentation":"Error \"You must install the `unstructured` and `lxml` package to use this node parser.\" thrown in run-llama/llama_index.","triggerScenarios":"Thrown at llama-index-core/llama_index/core/node_parser/relational/unstructured_element.py:44 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install the required packages: `pip install unstructured lxml`.","Use a different node parser that does not depend on unstructured."],"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-15T22:17:37.221Z"}