← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #254612]: sikulix remote server with jython start error:[error] ImagePath: addImagePath: not valid: /

 

Question #254612 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/254612

    Status: Open => Answered

RaiMan proposed the following answer:
--1. download the latest ready-to-use sikulixapi-1.1.0.jar from nightly
build

--2. if you want to use the SikuliX Java API, then you should not add 
sikulixapi.jar\Lib
to your JYTHONPATH

You have to decide to either use the Sikuli Jython API 
- having sikulixapi.jar\Lib on sys.path
- using 
from sikuli import *
which implements a Jython wrapper around the Java API (which allows to use the undotted methods like find, wait, click using the primary screen a search region)

or to use the Java API directly only having sikulixapi.jar on the class path using
from org.sikuli.script import *

(which I would not do anyways, but import every needed class separately)

--2. ImagePath error
You might ignore this error if you use image file names with absolute path.
The concepts of Sikuli generally allows to use image folders and relative image names.
… and the basic image folder is the so called bundle (which usually is a .sikuli folder containing the images and the script)

So the most simple case is:
ImagePath.setBundlePath("absolute path to folder containing your images")
someRegion.find("someImage.png") # .png might be omitted

will find the image file in the given folder

the ImagePath class allows to add more folders to the image path.
setBundlePath always sets the first entry. 

… more info should be found in the javadocs

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.