{"record":{"id":"6a2263017bb4716d","repo":"docling-project/docling","slug":"unexpected-table-dimensions-table-data-num-rows","errorCode":null,"errorMessage":"unexpected table dimensions: {table.data.num_rows}x{table.data.num_cols}","messagePattern":"unexpected table dimensions: (.+?)x(.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"perfs/xlsx_merged_cells.py","lineNumber":154,"sourceCode":") -> BenchmarkResult:\n    workbook_path = output_dir / f\"merged-ranges-{merge_count}.xlsx\"\n    generation_seconds = _create_workbook(workbook_path, merge_count=merge_count)\n\n    tracemalloc.start()\n    started = time.perf_counter()\n    converter = DocumentConverter(allowed_formats=[InputFormat.XLSX])\n    document = converter.convert(workbook_path).document\n    conversion_seconds = time.perf_counter() - started\n    _, peak_memory = tracemalloc.get_traced_memory()\n    tracemalloc.stop()\n\n    if len(document.tables) != 1:\n        raise RuntimeError(\n            f\"expected one table for {merge_count} merges, got {len(document.tables)}\"\n        )\n    table = document.tables[0]\n    if table.data.num_rows != merge_count or table.data.num_cols != 4:\n        raise RuntimeError(\n            f\"unexpected table dimensions: {table.data.num_rows}x{table.data.num_cols}\"\n        )\n\n    return BenchmarkResult(\n        python_version=runtime_info.python_version,\n        platform=runtime_info.platform,\n        docling_version=runtime_info.docling_version,\n        commit_sha=runtime_info.commit_sha,\n        merge_count=merge_count,\n        non_empty_cells=merge_count * 2,\n        rectangle_area=merge_count * 4,\n        generation_seconds=round(generation_seconds, 6),\n        conversion_seconds=round(conversion_seconds, 6),\n        peak_python_memory_mb=round(peak_memory / (1024 * 1024), 3),\n        table_count=len(document.tables),\n    )\n\n","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/docling-project/docling/blob/61d76f1ff3f8428065465889f7b4577da7df704c/perfs/xlsx_merged_cells.py#L136-L172","documentation":"Error \"unexpected table dimensions: {table.data.num_rows}x{table.data.num_cols}\" thrown in docling-project/docling.","triggerScenarios":"Raised by perfs/xlsx_merged_cells.py when the single converted table's row/column dimensions do not match merge_count rows by 4 columns.","commonSituations":"Regression in XLSX table reconstruction for merged cell ranges, e.g. merged regions collapsing rows/columns or producing extra grid cells.","solutions":["Confirm the workbook layout: each merged row spans columns 1-3 plus a value in column 4, so the expected table is merge_count rows by 4 columns.","Check how the Docling XLSX backend handles merged cells in the version under test; merged-range handling changes can alter reported num_cols.","Dump document.tables[0].data to inspect actual dimensions and cell placement to see whether rows or columns were collapsed."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"61d76f1ff3f8428065465889f7b4577da7df704c","analyzedAt":"2026-08-14T23:53:18.727Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}