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

bug: Tesseract command line options only work on 5.x #20

Open
popey opened this issue May 16, 2024 · 1 comment
Open

bug: Tesseract command line options only work on 5.x #20

popey opened this issue May 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@popey
Copy link
Contributor

popey commented May 16, 2024

Expected behavior

Quicktest should work on Ubuntu 22.04.

Actual behavior

Tesseract fails with Error, unknown command line argument '--loglevel'

Workaround:

Unset the tesseract options environment variable or set it to something else. TESSERACT_OCR_OPTIONS="--oem 0" ./quicktest

Steps to reproduce the behavior

Run Quicktest on Ubuntu 22.04

Additional context

We should probably either detect the version of tesseract and bail if less than 5.x, or perferably, tweak settings depending on the version of tesseract installed. Ideally people should be able to run this on any release.

@popey popey added the bug Something isn't working label May 16, 2024
@philclifford
Copy link
Contributor

philclifford commented May 16, 2024

For me, with the above TESSERACT_OCR_OPTIONS="--oem 0" workaround on 22.04 I then get

Error: Tesseract (legacy) engine requested, but components are not present in /usr/share/tesseract-ocr/4.00/tessdata/eng.traineddata!!
Failed loading language 'eng'
Tesseract couldn't load any languages!

but

List of available languages (4):
cym
eng
gla
osd

so resorted to looking minimally at the --help-extra and tried --oem 3 , which got further but failed to PASS (the requested text was there but not found). 🛑

UPDATE

[20240517-150932] 📁 /home/phil/src/quicktest/results/alpine/v3.19/test_boot_to_login/20240517-150833
[20240517-150932] 🎉 Test passed: test_boot_to_login

The solution was to grab the best tessdata eng file.
🎆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants