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

fra.traineddata corrupted ? #42

Closed
japafrite opened this issue Nov 23, 2019 · 3 comments
Closed

fra.traineddata corrupted ? #42

japafrite opened this issue Nov 23, 2019 · 3 comments
Labels

Comments

@japafrite
Copy link

Hey, this fra.traineddata (in tessdata_best) doesn't work, I get this error:
pytesseract.pytesseract.TesseractError: (1, "Tesseract Open Source OCR Engine v3.04.01 with Leptonica read_params_file: Can't open 1 read_params_file: Can't open -psm read_params_file: Can't open 7 Failed loading language 'fra' Tesseract couldn't load any languages! Could not initialize tesseract.")
And this file seems to small compared to others.
Everything works when I come back to original file.

@stweil
Copy link
Contributor

stweil commented Nov 23, 2019

Chances are high that you did not download the traineddata file, but an HTML page. Try to open the file in your editor.

@japafrite
Copy link
Author

My editor can't open it because it's not a text file or encoding is not supported.
Method applied : download button with firefox and then move file
fra.traineddata 4.0 on https://github.com/tesseract-ocr/tesseract/wiki/Data-Files => OK
fra.traineddata on https://github.com/tesseract-ocr/tessdata => OK
fra.traineddata on https://github.com/tesseract-ocr/tessdata_best => NOK

@zdenop
Copy link
Contributor

zdenop commented Nov 23, 2019

Your tesseract (version) is old you download datafiles for recent version which of course does not work (expected behavior). Upgrade your tesseract and everything will works.

@zdenop zdenop closed this as completed Nov 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants