[error] TextRecognizer: init: tessdata folder not found at C:/Sikuli/libs/

Asked by Richard Mullins

I am quite new to this software however I have created the following script, when I run the script I am getting several errors, are you able to shed any light?

#from org.sikuli.scrip.natives import visio
#vision.setparameter("minTargetSize", 48)

Settings.OcrTextRead = True;
Settings.OcrTextSearch = True;

exists("1406823151150.png")
click("1406823164931.png")

if not exists("1406821026278.png"):
    click ("1406821150179.png")
selectionLists = list(find("1406823583831.png").right().findAll(Pattern("1406821298032.png").exact()))
print "[log] number of listboxes found: " + str(len(selectionLists))
print "[log] number of arguments passed: " + str(len(sys.argv))

selectionList = int(0)
if sys.argv[0] == "Carrier":
    selectionList = 0
if sys.argv[0] == "Service":
    selectionList = 1
if sys.argv[0] == "Package":
    selectionList = 2

# will use OCR if no image provided but certain elements are difficult or contain unicode which Sikuli has trouble parsing
listChoice = sys.argv[0]
if listChoice == "UPS Server": listChoice = Pattern("1406822521994.png").exact()

if listChoice == "Package": listChoice = Pattern("1406887439196.png").exact()

click(selectionLists[selectionList])
click(listChoice)

the errors I am getting are:

[log] CLICK on L(928,512)@S(0)[0,0 1920x1080]

[log] number of listboxes found: 3
[log] number of arguments passed: 1
[log] CLICK on L(1331,564)@S(0)[0,0 1920x1080]

[error] TextRecognizer: init: tessdata folder not found at C:/Sikuli/libs/
[error] Region.find(text): text search is now switched off
[error] script [ UPS server ] stopped with error in line 31
[error] FindFailed ( Text search currently switched off )

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
IvoGuerreiro (ivoguerreiro) said :
#1

I'm not a programer, but i never saw paths like "C:/Sikuli/libs/" in any linux.

C:/; A:/ . . . . Are Mwindows path!

Revision history for this message
RaiMan (raimund-hocke) said :
#2

You seem to have version 1.0.1 installed in C:\Sikuli

I suppose, you selected the tesseract option at setup.

solution: delete the folder C:\Sikuli\libs and run whatever you used again.
The libs folder should be recreated now with the tessdata folder contained.
This is a quirk in 1.0.1 and is fixed in 1.1.0

Revision history for this message
RaiMan (raimund-hocke) said :
#3

@Ivo

yes these are Windows path's.

Deep down in Java a file always shows forward slashes.
you might even see:
/C:/Sikuli/libs

The "correct" use of backslashes in Java is only visible at the surface (e.g. a string specifying a file path)

Java will "understand" every mix of forward and backward slashes, as long as the file path can be mapped on the current system to a valid path.

Can you help with this problem?

Provide an answer of your own, or ask Richard Mullins for more information if necessary.

To post a message you must log in.