[1.1.0-Beta1] Using find(text) or findText(text) does not initialize Tesseract correctly - workaround --- fixed with Beta2

Bug #1319005 reported by RaiMan on 2014-05-13
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sikuli
Critical
RaiMan

Bug Description

********* workaround

with Java:
org.sikuli.basics.Settings.OcrTextRead = true;
org.sikuli.basics.Settings.OcrTextSearch = true;
(new Region(0,0,20,20)).text() // this triggers the Tesseract initialization

with Python scripting
Settings.OcrTextRead = True;
Settings.OcrTextSearch = True;
Region(0,0,20,20).text() # this triggers the Tesseract initialization

---------------------------------------------------------------------

Hi,
after trying out the Sikuli IDE with python I wanted to try the java version.
Based on the available documentation (and some answers to previously asked questions) the sikuli-java.jar (or with the new version sikulixapi.jar) from the SikuliX.app folder should be directly referenced within the project (I'm using Eclipse).

Unfortunately I didn't find an explanation how to get the .app for the beta version 1.1.0. I've tried the installation via sikulixsetup-1.1.jar and selected all options. No IDE is being build.

The same applies when I build from source code via mvn clean install.

So I've tried linking the sikulixapi.jar from the SikuliX folder (the one where I've executed the setup).
I am now getting following error message:

Error opening data file tessdata/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!

I have to say that opening of system preferences is working (via App.open("System Preferences.app");).
What is not working is text recognition (which explains why the program is looking for tessdata).

Here's my question: how should the environment be set up on MAC in order to execute the TestNG test ideally without external dependencies (for Continuous Integration systems)?

Thanks in advance.

RaiMan (raimund-hocke) on 2014-05-13
description: updated
Changed in sikuli:
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.0
RaiMan (raimund-hocke) on 2014-06-27
Changed in sikuli:
importance: High → Critical
summary: [1.1.0-Beta1] Using find(text) or findText(text) does not initialize
- Tesseract correctly - workaround
+ Tesseract correctly - workaround --- fixed with Beta2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers