fix: add error handling in hOCR pipeline
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user