tessdata folder not found at

Asked by elifcan çakmak

Hello,

I have the same question as many others. When I tried to extract a text it gives me the following error:

[error] TextRecognizer: init: tessdata folder not found at
[error] Region.text: text recognition is now switched off

Even after I tried every possible solution I still get the error. For example I tried to use

Settings.OcrDataPath = "your tessdata folder path"

tessdata folder exists in my path but it still says it doesn't.

Here is my code:

Settings.OcrDataPath = '/home/elifcan/downloads/libs'
Settings.OcrTextRead = True
Settings.OcrTextSearch = True
r=(Region(533,488,74,19))
id = r.text()
print id

here is the error: TextRecognizer: init: tessdata folder not found at /home/elifcan/downloads/libs/

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
elifcan çakmak
Solved:
Last query:
Last reply:
Revision history for this message
Cameron Jones (jones-cameron-314) said :
#1

Hey,

I don't know which solutions you have tried so far, but it is a known issue that in SikuliX 1.0.1, if you enable the OCR functionality, you need to rebuild the libs folder, so my recommendation if you haven't already done so, is to delete the contents of the libs folder, then launch the IDE again, and it will rebuild the libraries with the correct tessdata and you should be all set.

Revision history for this message
elifcan çakmak (elifcan88) said :
#2

Hey,
Yes i already tried that, in fact it was the first thing i did. However i still have the problem.

Revision history for this message
Cameron Jones (jones-cameron-314) said :
#3

I figured that would be the case.
I assume you also have linked everything correctly so that the environment variables all work?
ex:
"
echo export LD_LIBRARY_PATH=/usr/local/lib >> /etc/profile
echo export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig >> /etc/profile
echo export TESSDATA_PREFIX=/home/<username>/Downloads/tesseract-ocr >> /etc/profile

# To set for current session
export LD_LIBRARY_PATH=/usr/local/lib
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export TESSDATA_PREFIX=/home/<username>/Downloads/tesseract-ocr

ldconfig -v
"

Revision history for this message
elifcan çakmak (elifcan88) said :
#4

Hey, thanks for the suggestion. After you wrote, I did but I still get the error.

Revision history for this message
elifcan çakmak (elifcan88) said :
#5

Hello, I just realized a tiny capital letter problem :) However after I fixed it I got this fatal error this time:

Error: Illegal min or max specification!
"Fatal error encountered!" == NULL:Error:Assert failed:in file globaloc.cpp, line 75
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f2840e3033a, pid=12624, tid=139810874234624
#
# JRE version: OpenJDK Runtime Environment (7.0_79-b14) (build 1.7.0_79-b14)
# Java VM: OpenJDK 64-Bit Server VM (24.79-b02 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 2.5.5
# Distribution: Ubuntu 14.04 LTS, package 7u79-2.5.5-0ubuntu0.14.04.2
# Problematic frame:
# C [libtesseract.so.3+0x22533a] ERRCODE::error(char const*, TessErrorLogCode, char const*, ...) const+0x16a
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/elifcan/Downloads/hs_err_pid12624.log
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
# http://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

Revision history for this message
elifcan çakmak (elifcan88) said :
#6

Hello!! I don't exactly know what happened but now it works fine :) Thanks for the help @cameron :)