qurator-spk / ocrd-galley

A Dockerized test environment for OCR-D processors 🚢
Apache License 2.0
7 stars 1 forks source link

eynollah image seems to be broken #69

Open mikegerber opened 1 year ago

mikegerber commented 1 year ago
% ocrd-eynollah-segment -I OCR-D-IMG-BIN-TEST-SBBBIN -O OCR-D-SEG-LINE-TEST-EYNO -P models default
Using quratorspk/ocrd-galley-eynollah:test-github-actions
17:00:13.408 INFO eynollah - INPUT FILE PHYS_0024 (1/1)
Traceback (most recent call last):
  File "/usr/local/bin/ocrd-eynollah-segment", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/qurator/eynollah/ocrd_cli.py", line 8, in main
    return ocrd_cli_wrap_processor(EynollahProcessor, *args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/ocrd/decorators/__init__.py", line 117, in ocrd_cli_wrap_processor
    run_processor(processorClass, ocrd_tool, mets, workspace=workspace, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/ocrd/processor/helpers.py", line 121, in run_processor
    processor.process()
  File "/usr/local/lib/python3.6/dist-packages/qurator/eynollah/processor.py", line 47, in process
    'dir_models': self.resolve_resource(self.parameter['models']),
  File "/usr/local/lib/python3.6/dist-packages/ocrd/processor/base.py", line 219, in resolve_resource
    cwd=cwd, moduled=self.moduledir)
  File "/usr/local/lib/python3.6/dist-packages/ocrd/processor/base.py", line 266, in moduledir
    return resource_filename(self.module, '')
  File "/usr/local/lib/python3.6/dist-packages/ocrd/processor/base.py", line 256, in module
    if sys.modules[fqname].__file__:
AttributeError: module 'qurator' has no attribute '__file__'
mikegerber commented 1 year ago

eynollah GitHub seems to have a number of commits after the lastest release (0.0.10 from 2021), waiting for a new release.

mikegerber commented 1 year ago

For some reason, I have the same problem with ocrd-sbb-textline-detector.

And it's using Python 3.6, which it shouldn't?

mikegerber commented 1 year ago

For some reason, I have the same problem with ocrd-sbb-textline-detector.

This is confusing at the problem only happens when calling through ocr-evaluation's make-eval, not when calling the wrapper directly...

mikegerber commented 1 year ago

Problem is related to resource resolving, seems to work when using the full path

mikegerber commented 1 year ago

Seems to be fixed in OCR-D/core, updating minimum version.

mikegerber commented 1 year ago

ocrd-sbb-textline-detector is fixed by updating OCR-D/core. Haven't checked eynollah yet.