← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #676645]: ImportError: no module named sikuli

 

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

    Status: Needs information => Open

Dave Kane gave more information on the question:
RaiMan,
I execute the script from the command line via jython dak2.py.
I want to remote into a box and kick off the python script to run the test that executes a GUI.

I ran typescript to capture the settings, commands and output from the session, see below - I hope this helps
----------------------------
[admin@RFC1918 ~]$ who am i
admin    pts/10       2018-12-10 08:50

[admin@RFC1918 ~]$ pwd
/home/admin

[admin@RFC1918 ~]$ ls -l
total 4380
drwxr-xr-x. 2 admin admin       6 Nov 30 09:33 Desktop
drwxr-xr-x. 2 admin admin       6 Nov 30 09:33 Documents
drwxr-xr-x. 5 admin admin     192 Dec  7 15:26 Downloads
rw-rw-r--. 1 admin admin       0 Dec 10 08:50  for_raiman
drwxr-xr-x. 9 root  root      107 Nov 30 10:04 jdk-10.0.2
drwxr-xr-x. 2 admin admin       6 Nov 30 09:33 Music
drwxrwxr-x. 4 admin admin      91 Dec  1 11:18 opencv_extra
drwxr-xr-x. 2 admin admin      53 Dec  3 08:41 Pictures
drwxr-xr-x. 2 admin admin       6 Nov 30 09:33 Public
lrwxrwxrwx. 1 admin admin       6 Dec  9 12:19 sikuli -> Sikuli
drwxrwxrwx. 6 admin admin     112 Dec 10 08:24 Sikuli
-rw-rw-r--. 1 admin admin 4476928 Dec  2 13:42 sikuli_install
drwxrwxr-x. 2 admin admin     123 Dec  3 06:13 Sikuli.sikuli
drwxr-xr-x. 2 admin admin       6 Nov 30 09:33 Templates
-rw-rw-r--. 1 admin admin    2570 Dec 10 08:22 typescript
drwxr-xr-x. 2 admin admin       6 Nov 30 09:33 Videos

[admin@RFC1918 ~]$ cd sikuli

[admin@RFC1918 sikuli]$ echo $PATH
/usr/admin/Sikuli:/usr/bin/java:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/admin/.local/bin:/home/admin/bin

[admin@RFC1918 sikuli]$ echo $CLASSPATH
/usr/admin/Sikuli:/usr/bin/java:/usr/admin/Sikuli:/usr/bin/java:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/admin/.local/bin:/home/admin/bin

[admin@RFC1918 sikuli]$ ls -l
total 178244

drwxrwxr-x. 2 admin admin      146 Dec 10 05:15 dak2.sikuli
drwxrwxrwx. 7 admin admin      194 Dec 10 04:46 scripts
-rw-rw-r--. 1 admin admin 89065892 Nov 30 10:05 sikulixapi.jar
-rw-rw-r--. 1 admin admin 93451308 Nov 30 10:06 sikulix.jar
drwxrwxr-x. 4 admin admin       79 Dec  6 05:09 testing
drwxrwxr-x. 3 admin admin       49 Dec  7 15:27 testing1

[admin@RFC1918 sikuli]$ cd dak2.sikuli

[admin@RFC1918 dak2.sikuli]$ ls
13m1543841075949.png  13m1543841152578.png 13m1543841459086.png  13m1543841761188.png  13m1543846611451.png  dak2.py

[admin@RFC1918 dak2.sikuli]$ cat dak2.py
import  org.sikuli.script.SikulixForJython
from sikuli import *
Region(434,334,6,4)
"""
click("1543841075949.png")
"""
click("1543841459086.png")
wait(2)
type("clear \n")
wait(2)
type("pwd \n")
wait(1)
type("ls \n")
wait(2)
type ("cd jdk-10.0.2 \n")
wait(2)
type ("ls -l \n")
wait(2)
type ("cd .. \n")
wait(2)
click("1543841761188.png")
wait(2)
click("1543846611451.png")
"""
   wait(2)
   waitVanish(image")
   type("t", KeyModifier.CTRL   
   App.open("blah")  
   keyDown("a")
   keyUp("a")
   keyDown(Key.Left) 
   keyUp(Key.Left)
   rightClick()
   waitVanish()
"""
[admin@RFC1918 dak2.sikuli]$ 

[admin@RFC1918 dak2.sikuli]$ which java
/usr/bin/java

[admin@RFC1918 dak2.sikuli]$ which jython
/usr/local/bin/jython

[admin@RFC1918 dak2.sikuli]$ jython dak2.py
Traceback (innermost last): 
File "dak2.py", line 1, in ?
ImportError: no module named sikuli

[admin@RFC1918 dak2.sikuli]$




      From: RaiMan <question676645@xxxxxxxxxxxxxxxxxxxxx>
 To: dakane204@xxxxxxxxx 
 Sent: Monday, December 10, 2018 9:46 AM
 Subject: Re: [Question #676645]: ImportError: no module named sikuli
  
Your question #676645 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/676645

    Status: Open => Needs information

RaiMan requested more information:
please paste your relevant environment settings for Jython and Java.

How do you run the script exactly?
is the Jython/bin on path?

Again: why do you do that? why don't you use the features of SikuliX?

-- 
To answer this request for more information, you can either reply to
this email or enter your reply at the following page:
https://answers.launchpad.net/sikuli/+question/676645

You received this question notification because you asked the question.

You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.