← Back to team overview

sikuli-driver team mailing list archive

[Question #180960]: can't import modules

 

New question #180960 on Sikuli:
https://answers.launchpad.net/sikuli/+question/180960

I have followed the instructions in the documentation but no matter what I do I can't import a custom module

Currently I have a folder with 2 sikuli scripts
libBroser.sikuli
test.sikuli

libBrowser has in the first line: from sikuli import * and two methods

my test.sikuli file only has "import libBrowser"

At this poing I want to clarify that I'm running mac Lion, both files are in the same folder, I have tried adding the path to the sys.path, I have all the alternatives that I found to add the folder to the path.
Also I tested the path doing popup(str(sys.path)) in the script, the path does have the correct info, I even see the libBrowser in the path.

But every time I try to run the script I get this:

[error] Stopped
[error] An error occurs at line 8
[error] Error message:
Traceback (most recent call last):
 File "/var/folders/df/lwy_y8g15t921z7kmzq5cxqm0000gn/T/sikuli-tmp7184138209776326037.py", line 8, in 
 import libBrowser
 File "/Applications/Sikuli-IDE.app/Contents/Resources/Java/sikuli-script.jar/Lib/sikuli/SikuliImporter.py", line 45, in load_module
 File "/Applications/Sikuli-IDE.app/Contents/Resources/Java/sikuli-script.jar/Lib/sikuli/SikuliImporter.py", line 25, in _load_module
ImportError: No module named libBrowser

Any ideas? am I missing something?


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