From 9b31a8c259988ddcc895517743091a16893a388d Mon Sep 17 00:00:00 2001 From: Shahroz Ahmad Date: Fri, 22 Aug 2025 12:21:13 -0300 Subject: [PATCH] fix: Normalizes the image element correctly when "text" is coming as None --- unstructured/partition/common/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unstructured/partition/common/common.py b/unstructured/partition/common/common.py index 468d356b44..7a1751b8e8 100644 --- a/unstructured/partition/common/common.py +++ b/unstructured/partition/common/common.py @@ -50,7 +50,7 @@ def normalize_layout_element( else: layout_dict = layout_element - text = layout_dict.get("text", "") + text = layout_dict.get("text") or "" # Both `coordinates` and `coordinate_system` must be present # in order to add coordinates metadata to the element. coordinates = layout_dict.get("coordinates") if coordinate_system else None