OCR find ("text") returns [error] Image: could not be loaded

Asked by joe fu

trying to use OCR to find ("Next") in the screen from the IDE
but it returns
[error] Image: could not be loaded: file:/C:/automation/testing.sikuli/Next.png

how to tell the IDE to use real text to search?

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
RaiMan (raimund-hocke) said :
#1

switch on text features

Revision history for this message
joe fu (jfu-yahoo) said :
#2

The IDE is still treating the text as image file when doing find('text').

how to switch on text features in IDE ?
do I need to launch it with ocr option?

I have installed it with all options enabled including the OCR feature

I have turned on the text search on IDE preferences.

I've add at the top of the IDE screen to turn on OCR search.
Settings.OcrTextRead=True
Settings.OcrTextSearch=True

Revision history for this message
joe fu (jfu-yahoo) said :
#3

btw, print SCREEN.text() works in my IDE.

Revision history for this message
joe fu (jfu-yahoo) said :
#4

it is similiar to this issue
https://bugs.launchpad.net/sikuli/+bug/1318074

is the bug still there in Sikulix 1.1.0 ?

Revision history for this message
Launchpad Janitor (janitor) said :
#5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

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

has nothing to do with the mentioned bug.

Be sure, you have setup final 1.1.0 with option 3.

alternatively with final 1.1.0 you might try
findText("Next")

which instantly switches to text search and does not try to interpret the given text as image filename.

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

did it

Can you help with this problem?

Provide an answer of your own, or ask joe fu for more information if necessary.

To post a message you must log in.