[1.0.1] Error 'text search is currently switched off' running simple click(image)

Asked by Imaadh

Hi,

So I'm just trying to run a script (any script, just a single click), although no matter what I do I get this error:

[error] Region.find(text): text search is currently switched off
[error] script [ *Untitled ] stopped with error in line 1
[error] FindFailed ( Text search currently switched off )

My script is simply:

click(image)

That;s it, and I keep getting this error.

Here's the log

... more
[debug] Debug: setLogFile: C:/SikuliX/SikuliLog.txt
[debug (8/29/13 1:59:26 PM)] Running on Java 7 (1.7.0_25-b17)
[debug (8/29/13 1:59:26 PM)] --- Sikuli parameters ---
[debug (8/29/13 1:59:26 PM)] 1: -d
[debug (8/29/13 1:59:26 PM)] init user preferences
[debug (8/29/13 1:59:26 PM)] locale: en_US
[debug (8/29/13 1:59:26 PM)] ResourceLoaderBasic: SikuliX Package Build: 1.0.1 25AUG2013190532
debug (8/29/13 1:59:31 PM)] CapturePrompt: started at (2,862) as L(2,862) on 0
[debug (8/29/13 1:59:32 PM)] CapturePrompt: finished at (52,899) as L(52,899) on 0
[debug (8/29/13 1:59:32 PM)] FileManager: tempdir create: C:\Users\*\AppData\Local\Temp\****\tmp-1260805943.sikuli
[debug (8/29/13 1:59:32 PM)] CapturePrompt.close: freeing resources
[debug (8/29/13 1:59:32 PM)] captureCompleted: C:/Users/*/AppData/Local/Temp/****/tmp-1260805943.sikuli/1377809972024.png
[debug (8/29/13 1:59:32 PM)] click( )
[debug (8/29/13 1:59:32 PM)] FileManager: tempfile create: C:\Users\*\AppData\Local\Temp\sikuli-5788026208251462871.png
[debug (8/29/13 1:59:34 PM)] FileManager: tempfile create: C:\Users\*\AppData\Local\Temp\sikuli-8137529178244894714.py
[debug (8/29/13 1:59:34 PM)] SikuliX Jython Support Build: 1.0.1 25AUG2013190539
[debug (8/29/13 1:59:35 PM)] JythonScriptRunner: : executeScriptHeader: adding SikuliX Lib path to sys.path
C:\SikuliX\sikuli-ide.jar\Lib
... more
[debug (8/29/13 1:59:37 PM)] ResourceLoaderBasic: loadLib: VisionProxy
[debug (8/29/13 1:59:37 PM)] ResourceLoaderBasic: loadLib: Found: VisionProxy
[debug (8/29/13 1:59:37 PM)] ResourceLoaderBasic: loadLib: Now loaded: VisionProxy
[debug (8/29/13 1:59:37 PM)] Jython: sikuli: Sikuli: import App
[debug (8/29/13 1:59:38 PM)] ResourceLoaderBasic: loadLib: Is already loaded: WinUtil
[debug (8/29/13 1:59:38 PM)] Jython: sikuli: Sikuli: import Key
[debug (8/29/13 1:59:38 PM)] Jython: sikuli: Sikuli: import from Basics
[debug (8/29/13 1:59:38 PM)] Jython: sikuli: Sikuli: import from compare
[debug (8/29/13 1:59:38 PM)] Jython: sikuli: Sikuli: init SikuliImporter
[debug (8/29/13 1:59:38 PM)] Jython: sikuli: Sikuli: import SikuliScript
[debug (8/29/13 1:59:38 PM)] Jython: init SCREEN as ()
[debug (8/29/13 1:59:38 PM)] JythonScriptRunner: : executeScriptHeader: PyInit: resetROI()
[debug (8/29/13 1:59:38 PM)] JythonScriptRunner: : executeScriptHeader: PyInit: setShowActions(False)
[debug (8/29/13 1:59:38 PM)] Sikuli-IDE environment setup: 4063

[debug (8/29/13 1:59:38 PM)] waiting for __CLICK-TO-CAPTURE__ to appear
[debug (8/29/13 1:59:38 PM)] Screen.capture: java.awt.Rectangle[x=0,y=0,width=1440,height=900]
[debug (8/29/13 1:59:38 PM)] RobotDesktop: captureScreen: on 0 using java.awt.Rectangle[x=0,y=0,width=1440,height=900]
[error (8/29/13 1:59:39 PM)] Region.find(text): text search is currently switched off
[error (8/29/13 1:59:39 PM)] script [ *Untitled ] stopped with error in line 1
[error (8/29/13 1:59:39 PM)] FindFailed ( Text search currently switched off )
... more

Question information

Revision history for this message
Roman Podolyan (podolyan-roman) said :
#1

It seems that you may be run into this known bug:

https://answers.launchpad.net/sikuli/+question/234713
Upon saving a test case, image changes to "_CLICK-TO-CAPTURE"

Check with you installation and script if this is the issue. There is no build with fix so far, you can go for workaround proposed in the comments in that thread.

Revision history for this message
Imaadh (imaadh) said :
#2

That didn't work. Now I get this error:

[error] C:\Users\*\AppData\Local\Temp\**** mp-1487817818.sikuli_7832151964.png looks like a file, but not on disk. Assume it's text.
[error] Region.find(text): text search is currently switched off
[error] script [ *Untitled ] stopped with error in line 1
[error] FindFailed ( Text search currently switched off )

Revision history for this message
Roman Podolyan (podolyan-roman) said :
#3

Check if image is still there, because by default option to delete *unused* images on save is activated and they gets delete.

Revision history for this message
Imaadh (imaadh) said :
#4

After some more tinkering I have now come to this error (after saving the image/script and confirming that it is there):

[error] C:\SikuliX est1.sikuli_7833131890.png looks like a file, but not on disk. Assume it's text.
[error] script [ test1 ] stopped with error in line 1
[error] FindFailed ( can not find C:\SikuliX est1.sikuli_7833131890.png on the screen. )

Revision history for this message
Roman Podolyan (podolyan-roman) said :
#6

Confirmed. It seems that absolute path are broking for now, the script searches for the "C:\SikuliX est1.sikuli_7833131890.png " while the correct path should be "C:\SikuliX est1.sikuli\7833131890.png", there is "_" instead of "\" in the error message.

Working for me one more workaround:
1) In Preferences -> More options turn deletion of unused images off and showing script as text on (http://i44.tinypic.com/97mf7t.png — here is mine actual for reference)
2) DELETE path information from the image reference, so that it should look like click("1377834016260.png")

I know that this is way inconvenient, but this is the only workaround I can propose for now :(

Revision history for this message
Imaadh (imaadh) said :
#7

Ah, deleting the path got it to work!

Thanks for your help!

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

no longer a problem