← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #214725]: Facing issue while importing Sikuli script in Eclipse

 

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

    Status: Answered => Open

ambiga is still having a problem:
Hi Raiman,
Am still facing some issues:

Have removed "C:\Program Files\Sikuli X\sikuli-script.jar" from External libraries
& 
have added "C:\Program Files\Sikuli X\sikuli-script.jar" in Jython Interpreters Preferences dialog box_Libraries tab.

You have stated to copy only the contained folder sikuli to the folder
C:\jython2.5.3\Lib or C:\jython2.5.3\Lib\site-packages.  Am not sure
what i have done is right. I have unzipped the sikuli-script.jar file in
the folder "C:\sikuli-script" and have copied "C:\sikuli-script\Lib"
folder contents to "C:\jython2.5.3\Lib\site-packages" folder.

Have deleted the imgs folder in Eclipse (as you hav stated, import
command does it and it is not needed)

Have deleted 'Sikuli-ide' folder from exlipse. (Sikuli-ide folder is the
one in which I have placed the contents from "C:\Program Files\Sikuli X"
folder)

Please correct me if anything that I have done is wrong.

You have stated lik "having a folder containing .sikuli folders, that
need to be imported, in sys.path is sufficient". Does the line in my
code "myScriptPath = "C:\Users\ambigaj" " meets this requirement, else,
something else needs to be done?


Already done things: Please correct if am wrong:
==============================
 Copied 'Desktop.py' from "C:\Users\ambigaj\Desktop.sikuli" and pasted it under 'src' folder in eclipse
 So my src folder has both 'Desktop.py' and 'samp.py' files


Have modified the script as you said and while running facing the below issue:

C:\Users\ambigaj\workspace\sample\src
C:\Users\ambigaj\workspace\sample\src
C:\sikuli-script\Lib
C:\jython2.5.3\Lib
C:\jython2.5.3\Lib\site-packages
C:\Program Files\Java\jre6\lib\resources.jar
C:\Program Files\Java\jre6\lib\rt.jar
C:\Program Files\Java\jre6\lib\jsse.jar
C:\Program Files\Java\jre6\lib\jce.jar
C:\Program Files\Java\jre6\lib\charsets.jar
C:\Program Files\Java\jre6\lib\ext\dnsns.jar
C:\Program Files\Java\jre6\lib\ext\localedata.jar
C:\Program Files\Java\jre6\lib\ext\sunjce_provider.jar
C:\Program Files\Java\jre6\lib\ext\sunmscapi.jar
C:\Program Files\Java\jre6\lib\ext\sunpkcs11.jar
C:\Program Files\Sikuli X\sikuli-script.jar
__classpath__
__pyclasspath__/
[info] Sikuli vision engine loaded.
[info] Windows utilities loaded.
[info] VDictProxy loaded.
[error] 1353412358967.png looks like a file, but can't be found on the disk. Assume it's text.
[info] Text Recognizer inited.
[error] 1353412358967.png looks like a file, but can't be found on the disk. Assume it's text.
[error] 1353412358967.png looks like a file, but can't be found on the disk. Assume it's text.
[error] 1353412358967.png looks like a file, but can't be found on the disk. Assume it's text.
[error] 1353412358967.png looks like a file, but can't be found on the disk. Assume it's text.
[error] 1353412358967.png looks like a file, but can't be found on the disk. Assume it's text.
Traceback (most recent call last):
  File "C:\Users\ambigaj\workspace\sample\src\samp.py", line 15, in <module>
    import Desktop
  File "C:\Users\ambigaj\workspace\sample\src\Desktop.py", line 2, in <module>
    click("1353412358967.png")
  Line 15, in file C:\Users\ambigaj\workspace\sample\src\samp.py


	at org.sikuli.script.Region.handleFindFailed(Region.java:420)

        at org.sikuli.script.Region.wait(Region.java:511)

        at org.python.proxies.sikuli.Region$Region$0.super__wait(Unknown
Source)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)

        at java.lang.reflect.Method.invoke(Unknown Source)


org.sikuli.script.FindFailed: FindFailed: can not find 1353412358967.png on the screen.
  Line 15, in file C:\Users\ambigaj\workspace\sample\src\samp.py

=========================================================

Desktop.py shows error like "Undefined variable click", next to the
click statement.

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