{"record":{"id":"a22f5ec8efc5bd51","repo":"docling-project/docling","slug":"the-arelle-release-package-is-required-to-proces","errorCode":null,"errorMessage":"The 'arelle-release' package is required to process XBRL documents. Please install it using `pip install 'docling-slim[format-xml-xbrl]'`","messagePattern":"The 'arelle-release' package is required to process XBRL documents\\. Please install it using `pip install 'docling-slim\\[format-xml-xbrl\\]'`","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"docling/backend/xml/xbrl_backend.py","lineNumber":93,"sourceCode":"    Refer to https://www.xbrl.org for more details on XBRL. In particular, refer to\n    https://www.xbrl.org/Specification/taxonomy-package/REC-2016-04-19/taxonomy-package-REC-2016-04-19.html\n    for details on how to provide a taxonomy package.\n\n    This backend leverages the Arelle library for XBRL processing.\n    \"\"\"\n\n    @override\n    def __init__(\n        self,\n        in_doc: InputDocument,\n        path_or_stream: BytesIO | Path,\n        options: XBRLBackendOptions | None = None,\n    ) -> None:\n        if options is None:\n            options = XBRLBackendOptions()\n        # Check if arelle is available before proceeding\n        if not _XBRL_AVAILABLE:\n            raise ImportError(\n                \"The 'arelle-release' package is required to process XBRL documents. \"\n                \"Please install it using `pip install 'docling-slim[format-xml-xbrl]'`\"\n            ) from _XBRL_IMPORT_ERROR\n\n        super().__init__(in_doc, path_or_stream)\n        self.options: XBRLBackendOptions = options\n        self.model_xbrl: ModelXbrl | None = None\n        self._kv_idx: int = 0\n        self._cells: list[GraphCell] = []\n        self._links: list[GraphLink] = []\n        self._hierarchy_cell_ids: dict[str, int] = {}\n        self._fact_cell_ids: dict[str, list[int]] = defaultdict(list)\n        self._created_links: set[tuple[int, int]] = set()\n\n        try:\n            if (\n                not self.options.enable_local_fetch\n                and not self.options.enable_remote_fetch","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/docling-project/docling/blob/61d76f1ff3f8428065465889f7b4577da7df704c/docling/backend/xml/xbrl_backend.py#L75-L111","documentation":"The XBRL backend requires the arelle-release package (Arelle XBRL toolkit), an optional extra in docling-slim. Its __init__ checks _XBRL_AVAILABLE and raises ImportError with the install hint chained to the original import failure, before touching the document.","triggerScenarios":"Converting an XBRL document (instance or taxonomy-backed) with docling-slim lacking format-xml-xbrl; XBRLBackend.__init__ raises immediately regardless of the document's content.","commonSituations":"Slim deployments (Lambda/containers) that only needed PDF initially; adding financial-report processing later; arelle-release failing to install on exotic platforms.","solutions":["pip install 'docling-slim[format-xml-xbrl]'.","Or install the full docling meta-package.","Verify with python -c 'import arelle' after installation.","Pin the extra in your lock/requirements file to survive image rebuilds."],"exampleFix":"# before\npip install docling-slim\nDocumentConverter().convert(Path(\"report.xbrl\"))  # ImportError\n\n# after\npip install 'docling-slim[format-xml-xbrl]'\nDocumentConverter().convert(Path(\"report.xbrl\"))","handlingStrategy":"validation","validationCode":"from importlib.util import find_spec\n\ndef xbrl_dependencies_available() -> bool:\n    return find_spec(\"arelle\") is not None","typeGuard":null,"tryCatchPattern":"try:\n    result = converter.convert(xbrl_path)\nexcept ImportError as e:\n    if \"format-xml-xbrl\" in str(e):\n        raise SystemExit(\"Install first: pip install 'docling-slim[format-xml-xbrl]'\") from e\n    raise","preventionTips":["Install extras per format at environment build time.","Import-smoke each backend in CI for formats in your corpus.","Pin the extra in requirements/uv so rebuilds keep XBRL support."],"tags":["xbrl","import-error","dependencies","docling-slim","arelle","packaging"],"backgroundTag":null,"analyzedSha":"61d76f1ff3f8428065465889f7b4577da7df704c","analyzedAt":"2026-08-14T23:53:18.727Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}