You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although I see the reason behind this error, I wonder if it is just not better to try parsing string parameters to a boolean where a boolean is expected.
Caused by:
Process `ocrd_tesserocr_segment` terminated with an error exit status (1)
Command executed:
singularity exec --bind /scratch1/users/mmustaf/operandi/slurm_workspaces/94200a5d-f332-4391-8699-92fbf81b4e7e --bind /scratch1/users/mmustaf/ocrd_models:/usr/local/share --env OCRD_METS_CACHING=true /scratch1/users/mmustaf/ocrd_all_maximum_image.sif ocrd-tesserocr-segment -m mets.xml -I OCR-D-BIN-DENOISE-DESKEW -O OCR-D-SEG -p '{"shrink_polygons": "true"}'
Command exit status:
1
Command output:
(empty)
Command error:
Traceback (most recent call last):
File "/usr/local/bin/ocrd-tesserocr-segment", line 33, in <module>
sys.exit(load_entry_point('ocrd-tesserocr', 'console_scripts', 'ocrd-tesserocr-segment')())
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/build/ocrd_tesserocr/ocrd_tesserocr/cli.py", line 18, in ocrd_tesserocr_segment
return ocrd_cli_wrap_processor(TesserocrSegment, *args, **kwargs)
File "/build/core/ocrd/ocrd/decorators/__init__.py", line 151, in ocrd_cli_wrap_processor
run_processor(processorClass, mets_url=mets, workspace=workspace, **kwargs)
File "/build/core/ocrd/ocrd/processor/helpers.py", line 86, in run_processor
processor = get_processor(
File "/build/core/ocrd/ocrd/processor/helpers.py", line 342, in get_processor
return processor_class(
File "/build/ocrd_tesserocr/ocrd_tesserocr/segment.py", line 15, in __init__
super().__init__(*args, **kwargs)
File "/build/ocrd_tesserocr/ocrd_tesserocr/recognize.py", line 130, in __init__
super().__init__(*args, **kwargs)
File "/build/core/ocrd/ocrd/processor/base.py", line 149, in __init__
raise Exception("Invalid parameters %s" % report.errors)
Exception: Invalid parameters ["[shrink_polygons] 'true' is not of type 'boolean'"]
The text was updated successfully, but these errors were encountered:
-p '{"shrink_polygons": "true"}' should be -p '{"shrink_polygons": true}' or simply -P shrink_polygons true. The latter will already try to do type casting (although in a limited fashion).
Anyway, this is not a ocrd_tesserocr issue, it belongs to core. But see OCR-D/core#950 for the problems that casting can cause.
Although I see the reason behind this error, I wonder if it is just not better to try parsing string parameters to a boolean where a boolean is expected.
The text was updated successfully, but these errors were encountered: