From 266db849ac42e616663def6a79608ae46621d57a Mon Sep 17 00:00:00 2001 From: Alessio Vertemati Date: Fri, 6 Mar 2026 12:14:04 +0100 Subject: [PATCH] Handle empty parse response --- src/parxy_core/drivers/unstructured_local.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/parxy_core/drivers/unstructured_local.py b/src/parxy_core/drivers/unstructured_local.py index 6315419..440759d 100644 --- a/src/parxy_core/drivers/unstructured_local.py +++ b/src/parxy_core/drivers/unstructured_local.py @@ -99,6 +99,9 @@ def _handle( details=wex.value, ) from wex + if not res: + return Document(filename=filename, language='en', pages=[]) + return unstructured_to_parxy(doc=res, level=level)