sikuli cannot find image on xmonad

Asked by Felzix

I am running xmonad version 0.10 off of a 64-bit ubuntu install (Ubuntu 12.04.1 LTS). My sikuli-ide is version 0.10.2. I have a multi-monitor setup.

I made a simple script to click a bookmark button. It screen captures fine but when I run the script, it says it can't find some png file.

Here's the message I see:

[info] Sikuli vision engine loaded.

[info] VDictProxy loaded.

[error] Stopped
[error] An error occurs at line 1
[error] Error message:
Traceback (most recent call last):
File "/tmp/sikuli-tmp5302072316882179987.py", line 1, in
click("1376519364762.png")
Line 1, in file /tmp/sikuli-tmp5302072316882179987.py

at org.sikuli.script.Region.handleFindFailed(Region.java:421)
at org.sikuli.script.Region.wait(Region.java:512)
at org.python.proxies.sikuli.Region$Region$1.super__wait(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)

org.sikuli.script.FindFailed: FindFailed: can not find 1376519364762.png on the screen.
Line 1, in file /tmp/sikuli-tmp5302072316882179987.py

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was originally filed as bug #1212461.

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

This is not a bug:
Sikuli cannot find the requested image on the screen at runtime.
So you have to find out why.

Revision history for this message
Felzix (felzix) said :
#2

It's definitely visible when I run the script. It's definitely the identical image. I re-wrote and re-ran the script under the Unity window manager and it worked. I ran a similar script under Windows on another machine and it worked.

My guess is sikuli can't read the screen under xmonad. But I don't know anything about how sikuli reads the screen to begin with so it would take an inordinate amount of time for me to debug this. Do you have any idea why it might not be able to find the image?

What's weird is that the screenshot works. Does the screenshot involve java? I know that xmonad has some issues with displaying java apps (grey screen). Could this be the cause?

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

Since I do not know anything about your environment, I cannot help you system specific.

- in Sikuli ALL features finally use Java (the Jython script level is only a wrapper)

- the image capture uses the Java Robot class internally. Since capture works, you have access to the screen. So not the problem.

- a find operation internally first captures the screen (or the region specified) to get the base image to search in (the find in Sikuli does not search on the screen, but in the image, that is captured from the screen at the moment of a find operation)

So the problem might be your multi monitor setup, that is not evaluated correctly by Sikuli in the failing setup.

So if possible, try in an environment, that only has one screen active at start of Sikuli.

Can you help with this problem?

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

To post a message you must log in.