danpla / dpscreenocr

Program to recognize text on screen
https://danpla.github.io/dpscreenocr/
zlib License
231 stars 17 forks source link

App doesn't see languages on Mint 20.2 #18

Closed joneldiablo closed 1 year ago

joneldiablo commented 2 years ago

I have this error qt5ct: using qt5ct plugin Error opening data file /usr/share/tesseract-ocr/4.00/tessdata/eng.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to your "tessdata" directory. Failed loading language 'eng' Tesseract couldn't load any languages!

but /usr/share/tesseract-ocr/5/tessdata/eng.traineddata is the new one

error from linux mint

danpla commented 2 years ago

What is your Linux Mint version? Does using the command-line tesseract tool gives the same message?

joneldiablo commented 2 years ago

I have fixed this problem putting:

export TESSDATA_PREFIX="/usr/share/tesseract-ocr/"

to the ~/.profile file. if I put this on ~/.bashrc only works when I run the dpscreenocr from command line but if I use the menu launcher of linux mint not work

joneldiablo commented 2 years ago

Linux Mint 20.2 Uma

danpla commented 2 years ago

I was unable to reproduce the issue on Linux Mint 20.2. The tesseract-ocr-eng package provides /usr/share/tesseract-ocr/4.00/tessdata/eng.traineddata, and dpScreenOCR seems to work fine without any error messages.

danpla commented 1 year ago

I assume the issue is related to your local configuration. Most likely, it's an incorrect path in the TESSDATA_PREFIX environment variable.

On Unix-like systems, it's best to ensure that TESSDATA_PREFIX is not set, which will let Tesseract pick the correct data path automatically.