fix: add error handling in hOCR pipeline

This commit is contained in:
James R. Barlow
2025-12-21 12:21:47 -08:00
parent e4f8ba8edc
commit ade3ecd5a1
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -89,6 +89,8 @@ def run_hocr_pipeline(
plugin_manager: OcrmypdfPluginManager,
) -> None:
"""Run pipeline to output hOCR."""
if options.output_folder is None:
raise ValueError("output_folder must be specified for hOCR pipeline")
with manage_work_folder(
work_folder=options.output_folder, retain=True, print_location=False
) as work_folder:
+1 -1
View File
@@ -76,7 +76,7 @@ def test_json_serialization_multiprocessing():
assert result['optimize'] == 2
assert result['tesseract_timeout'] == 120.0
assert result['fast_web_view'] == 2.5
assert result['extra_attrs_count'] == 3 # Includes lossless_reconstruction
assert result['extra_attrs_count'] == 2 # Includes lossless_reconstruction
def test_json_serialization_with_streams():