-
-
Notifications
You must be signed in to change notification settings - Fork 959
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
test_ocr tests fails #8931
Comments
Do you have tesseract data installed on the test system? Maybe https://forums.opensuse.org/t/tesseract-ocr-wrong-data-directory/164659/9 is related? |
This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger. In case your question is already answered, making a donation is the right way to say thank you! |
Hmm, it is in |
This issue has been automatically marked as stale because there wasn’t any recent activity. It will be closed soon if no further action occurs. Thank you for your contributions! |
This is not a support question! Does failure of your test suite not matter at all? |
I think it's tesseract not working on your system, that's why I've tagged it this way. |
What do you mean by “tesseract not working” for the insides of our build system? |
It's not recognizing the text. It can be caused by wrongly installed data files, missing dependency on the tesseract data, or something else. This test has been there for years (introduced in df4a52a), it worked before on SUSE, it works anywhere else so far. All that makes me think the issue is in your environment, and not in Weblate. |
Is there some command line command or something which could show me more what tesseract thinks is wrong with the setup? |
$ tesseract weblate/trans/tests/data/screenshot.png -
Warning: Invalid resolution 0 dpi. Using 70 instead.
Estimating resolution as 133
Source string
Hello, world!+
One
Orangutan has %d banana.«!
Other
Orangutan has %d bananas.
Try Weblate at <http://demo.weblate.org/>!«!
Thank you for using Weblate.
Screenshot is shown to add visual context for all listed source strings.
|
This issue has been automatically marked as stale because there wasn’t any recent activity. It will be closed soon if no further action occurs. Thank you for your contributions! |
That’s exactly (I believe) what I’ve got:
Actually, not exactly: |
A few different characters should not matter. Anyway, this test is not really showing where the problem is, I will add a separate test for the OCR recognition itself so that the error is easier to diagnose. |
Thank you for your report; the issue you have reported has just been fixed.
|
- use different resolutions instead of scaling image - load images directly by tesseract - use iterator instead of manually doing recognition - measure performance using Sentry - improves compatiblity with tesseract 5.x, fixes WeblateOrg#8931
- use different resolutions instead of scaling image - load images directly by tesseract - use iterator instead of manually doing recognition - measure performance using Sentry - improves compatiblity with tesseract 5.x, fixes #8931
Describe the issue
When packaging weblate 4.14.2 for openSUSE test
test_ocr
fails almost always (more in the build server than on my workstation, but it is in both close to 100%):Complete build log with the list of all packages used and all steps taken to reproduce.
I already tried
Steps to reproduce the behavior
Expected behavior
All test passing
Screenshots
test_ocr
fails almost alwaysException traceback
How do you run Weblate?
Other
Weblate versions
No response
Weblate deploy checks
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: