Trying to execute Sikuli script from another machine

Asked by Richard

Hi.

I created Sikuli script on machine A. Now I want to call that script from machine B (using python) to execute it on machine A (not machine B). Is it possible to do?

Both machines are Remote Desktops.

When I call the script from machine B, it gives me the following error:

Could not create the Java virtual machine.
+++ running this Java
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Objec
+++ trying to start Sikuli IDE
+++ using: -Xms1024M -Xmx2048M -Dfile.encoding=
Error occurred during initialization of VM
Could not reserve enough space for object heap

As you can see, I've already changed xms and xmx values in runIDE.cmd file.
The script on machine A is simple, just printing the line.

Question information

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

I was using SikuliX of ver. 1.0.1. So, I updated it to ver. 1.1.0 and got another error:
+++ The bundled Jython 2.7.0 cannot be used on Java 6! Run setup again in this environment. Click OK to terminate now.

I solved this by updating to java 7. Then I got another error:
+++ Java not found in standard places C:\Program Files (x86) or C:\Program Files (x86)
+++ JAVA_HOME not specified
+++ ended with some errors

So, I put JAVA_HOME to system's variables.
After that my script worked fine. I was able to call it from python.

The thing I am trying to do is: I want to call SikuliX script from the website.
I've got SikuliX installed on the same machine where the server is. When I call SikuliX script from python from cmd it works fine. However, when I call it from python from my website I get this output:

+++ running this Java +++ trying to run SikuliX +++ using: -Xms64M -Xmx512M -Dfile.encoding=UTF-8 -Dsikuli.FromCommandLine -jar C:\Users\xxx\SikuliX ver. 1.1.0\sikulix.jar -r "C:\Users\xxx\SikuliX\scripts\test.sikuli"
[error] Location: outside any screen (18208064, 18208064) - subsequent actions might not work as expected
[error] Location: outside any screen (18208064, 18208064) - subsequent actions might not work as expected
[error] script [ C:\Users\xxx\SikuliX\scripts\test.sikuli ] stopped with error in line 3 [error] FindFailed ( can not find 1454306430229.png in R[0,0 1024x768]@S(0) )

I might be wrong assuming that the Sikuli is connected to the monitor where it is installed? SikuliX is installed on the VM, and I run that machine on a separate monitor, so I am able to see the screen. I assumed that SikuliX will also run on that monitor. How could I identify this monitor properly?

Revision history for this message
Richard (friscote) said :
#2

So, the problem I'm facing is that SikuliX does not detect screen where it is installed.
It says:
[error] Location: outside any screen (16897344, 16897344) - subsequent actions might not work as expected

Revision history for this message
Richard (friscote) said :
#3

Using this tut, was able to run SikuliX on a headless machine (using TightVPN): http://stackoverflow.com/questions/26032706/how-to-get-sikuli-working-in-headless-mode/26032780#26032780

However, still need to somehow call SikuliX script remotely from the website (need it to be done automatically with no user interaction).

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

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

Revision history for this message
Richard (friscote) said :
#5

Got SikuliX script running remotely using psexec command.