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

teserract 4.0 compatibility #2581

Closed
nijel opened this issue Feb 26, 2019 · 4 comments
Closed

teserract 4.0 compatibility #2581

nijel opened this issue Feb 26, 2019 · 4 comments
Assignees
Labels
bug Something is broken.
Milestone

Comments

@nijel
Copy link
Member

nijel commented Feb 26, 2019

Describe the bug
The tesseract developers "fixed" unability to properly parse files under different locales by doing assert on locale (see tesseract-ocr/tesseract@3292484). This leads to Python crash when importing tesserocr with wrong locales, see sirfz/tesserocr#165.

To Reproduce
Steps to reproduce the behavior:

  1. Install tesseract 4.0 and tesserocr module.
  2. Set some reasonable locales (anything different than C).
  3. Try to start Weblate.
  4. See error

Expected behavior
It should work no matter what locales are set.

Additional context


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@nijel nijel added the bug Something is broken. label Feb 26, 2019
@nijel nijel added this to the 3.5 milestone Feb 26, 2019
nijel added a commit that referenced this issue Feb 26, 2019
This might improve performance of multiple recognitions and will be
necessary when fixing #2581.

Signed-off-by: Michal Čihař <[email protected]>
@nijel
Copy link
Member Author

nijel commented Feb 26, 2019

What is big question is when the C locales are actually needed. We might load the tesserocr object once per process and reuse it then. That way we would fiddle with the locales just once instead of doing that in every OCR request...

nijel added a commit that referenced this issue Feb 27, 2019
We really should have skipped test if OCR is not supported.

Issue #2581

Signed-off-by: Michal Čihař <[email protected]>
@nijel nijel closed this as completed in 6724204 Feb 27, 2019
@nijel
Copy link
Member Author

nijel commented Feb 27, 2019

Thank you for your report, the issue you have reported has just been fixed.

  • In case you see problem with the fix, please comment on this issue.
  • In case you see similar problem, please open separate issue.
  • If you are happy with the outcome, consider supporting Weblate by donating.

@nijel nijel self-assigned this Feb 27, 2019
nijel added a commit that referenced this issue Mar 1, 2019
The context can raise an exception and in that case we would not
properly reset the locale.

Issue #2581

Signed-off-by: Michal Čihař <[email protected]>
@nijel
Copy link
Member Author

nijel commented Apr 12, 2019

Still happens with current release, seems to be caused by requirements check, see #2684 and WeblateOrg/docker#200.

@nijel nijel reopened this Apr 12, 2019
@nijel nijel closed this as completed in afefd4e Apr 12, 2019
@nijel nijel modified the milestones: 3.5, 3.6 Apr 12, 2019
@nijel
Copy link
Member Author

nijel commented Apr 12, 2019

Thank you for your report, the issue you have reported has just been fixed.

  • In case you see problem with the fix, please comment on this issue.
  • In case you see similar problem, please open separate issue.
  • If you are happy with the outcome, consider supporting Weblate by donating.

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

No branches or pull requests

1 participant