Error in "ocrd-anybaseocr-layout-analysis"
stefanCCS opened this issue · 1 comments
stefanCCS commented
I have tried out a simple workflow with using "ocrd-cis-ocropy-binarize" and then using "ocrd-anybaseocr-layout-analysis"
I get an error (Python trace) when page 5 is reached:
(If you would like to get the images used, please contact me directly on Gitter).
13:47:13.721 INFO OcrdAnybaseocrLayoutAnalyser - INPUT FILE PAGE-5
13:47:14.466 INFO OcrdAnybaseocrLayoutAnalyser - ['page']
13:47:14.466 INFO OcrdAnybaseocrLayoutAnalyser - LOGICAL structMap already exists, adding to it
Traceback (most recent call last):
File "/home/ocrdadmin/ocrd_all/venv/local/sub-venv/headless-tf21/bin/ocrd-anybaseocr-layout-analysis", line 8, in <module>
sys.exit(cli())
File "/home/ocrdadmin/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/ocrdadmin/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/ocrdadmin/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ocrdadmin/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/ocrdadmin/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/ocrd_anybaseocr/cli/ocrd_anybaseocr_layout_analysis.py", line 257, in cli
return ocrd_cli_wrap_processor(OcrdAnybaseocrLayoutAnalyser, *args, **kwargs)
File "/home/ocrdadmin/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/ocrd/decorators/__init__.py", line 81, in ocrd_cli_wrap_processor
run_processor(processorClass, ocrd_tool, mets, workspace=workspace, **kwargs)
File "/home/ocrdadmin/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/ocrd/processor/helpers.py", line 68, in run_processor
processor.process()
File "/home/ocrdadmin/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/ocrd_anybaseocr/cli/ocrd_anybaseocr_layout_analysis.py", line 252, in process
self.write_to_mets(results, "PHYS_000" + str(n))
File "/home/ocrdadmin/ocrd_all/venv/local/sub-venv/headless-tf21/lib/python3.6/site-packages/ocrd_anybaseocr/cli/ocrd_anybaseocr_layout_analysis.py", line 174, in write_to_mets
log_div = ET.SubElement(parent_node, TAG_METS_DIV)
UnboundLocalError: local variable 'parent_node' referenced before assignment