Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in "ocrd-anybaseocr-layout-analysis" #73

Closed
stefanCCS opened this issue Oct 14, 2020 · 1 comment
Closed

Error in "ocrd-anybaseocr-layout-analysis" #73

stefanCCS opened this issue Oct 14, 2020 · 1 comment

Comments

@stefanCCS
Copy link

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
@kba
Copy link
Member

kba commented Mar 20, 2022

fixed by #89

@kba kba closed this as completed Mar 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants