diff --git a/src/parxy_core/drivers/llamaparse.py b/src/parxy_core/drivers/llamaparse.py index e62440d..ecd4ab3 100644 --- a/src/parxy_core/drivers/llamaparse.py +++ b/src/parxy_core/drivers/llamaparse.py @@ -482,11 +482,16 @@ def _convert_text_block(text_block: PageItem, page_number: int) -> TextBlock: TextBlock The converted `TextBlock` object. """ - bbox = BoundingBox( - x0=text_block.bBox.x, - y0=text_block.bBox.y, - x1=text_block.bBox.x + text_block.bBox.w, - y1=text_block.bBox.y + text_block.bBox.h, + ## Note: Bounding Box (bBox) can be None, it is still to be evaluated if that is a sign of hallucination or not + bbox = ( + BoundingBox( + x0=text_block.bBox.x, + y0=text_block.bBox.y, + x1=text_block.bBox.x + text_block.bBox.w, + y1=text_block.bBox.y + text_block.bBox.h, + ) + if text_block.bBox is not None + else None ) # Handle empty page marker text_value = text_block.value if text_block.value else ''