[WIN] [0.80] Tesseract loading languages #148

Closed
opened 2026-01-29 16:36:26 +00:00 by claunia · 1 comment
Owner

Originally created by @canihavesomecoffee on GitHub (May 22, 2016).

Originally assigned to: @canihavesomecoffee on GitHub.

When calling CCExtractor on Windows on a file with DVB subtitles (which calls the OCR), it fails to find the tessdata folder, and gives the next error:

Error opening data file ./tessdata/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!

When using the GUI, there is no problem.

The issue is most likely (as logged), a problem with the relative path (./tessdata) which creates issues if called from outside the installation folder.

Relevant lines:

bcfdda5f8d/src/lib_ccx/ocr.c (L91)

bcfdda5f8d/src/lib_ccx/ocr.c (L44)

Originally created by @canihavesomecoffee on GitHub (May 22, 2016). Originally assigned to: @canihavesomecoffee on GitHub. When calling CCExtractor on Windows on a file with DVB subtitles (which calls the OCR), it fails to find the tessdata folder, and gives the next error: ``` Error opening data file ./tessdata/eng.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory. Failed loading language 'eng' Tesseract couldn't load any languages! ``` When using the GUI, there is no problem. The issue is most likely (as logged), a problem with the relative path (./tessdata) which creates issues if called from outside the installation folder. Relevant lines: https://github.com/CCExtractor/ccextractor/blob/bcfdda5f8d61844a12462d0e064bdddf838d4c6a/src/lib_ccx/ocr.c#L91 https://github.com/CCExtractor/ccextractor/blob/bcfdda5f8d61844a12462d0e064bdddf838d4c6a/src/lib_ccx/ocr.c#L44
Author
Owner

@canihavesomecoffee commented on GitHub (Jun 8, 2016):

After investigation, this is an issue with Tesseract, not CCExtractor (see http://stackoverflow.com/questions/6950977/tesseract-change-language-file-location for example). Closing.

@canihavesomecoffee commented on GitHub (Jun 8, 2016): After investigation, this is an issue with Tesseract, not CCExtractor (see http://stackoverflow.com/questions/6950977/tesseract-change-language-file-location for example). Closing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#148