Closed stweil closed 6 months ago
The TypeError was introduced by commit 644bf7050d64b0847ce8bef0cda88004c37ee692:
644bf7050d64b0847ce8bef0cda88004c37ee692 is the first bad commit
commit 644bf7050d64b0847ce8bef0cda88004c37ee692
Author: Konstantin Baierer <unixprog@gmail.com>
Date: Wed Jan 31 11:54:03 2024 +0100
method -> ocr_method, make OCR optional ("none")
Makefile | 5 +++++
README.md | 38 ++++++++++++++++++++------------------
ocrd_froc/froc.py | 14 ++++++++------
ocrd_froc/network.py | 6 ++----
ocrd_froc/ocrd-tool.json | 29 ++++++++++++++++++++++++-----
ocrd_froc/processor.py | 27 ++++++++++++++-------------
6 files changed, 73 insertions(+), 46 deletions(-)
create mode 100644 Makefile
@kba, I narrowed down the TypeError further: if I revert the changes in ocrd_froc/processor.py, it no longer occurs.
I don't understand why I cannot reproduce the problem, because there is indeed the top-level __init__.py
missing. Nonetheless I'll prepare a PR which should fix the issue.
That PR does not fix the issue. I added a CI test which allows to reproduce it.
@kba, you could not reproduce the error because it does not occur with Python 3.7 and Python 3.8 as I just noticed. It requires Python 3.9 or later, but then occurs on macOS and Ubuntu. See https://github.com/stweil/ocrd_froc/actions/runs/8678819215/job/23796379466 for test results with different combinations of OS and Python version.
Those test results also show that running ocrd-froc-recognize
terminates with an error (1) even with Python 3.7 and Python 3.8. Running ocrd
without an argument returns success (0).
A modified CI which runs ocrd-froc-recognize --help
passes with Python 3.7 and Python 3.8 (see https://github.com/stweil/ocrd_froc/actions/runs/8678879366).
The issue can be closed as soon as pull request #14 was merged.
make check
for ocrd_all fails with the error messageTypeError: 'ocrd_froc.processor' is not a package
since at least ocrd_all v2024-02-01.I get the same error when I just run
ocrd-froc-recognize
without any argument: