← Back to team overview

sikuli-driver team mailing list archive

[Bug 1504901] [NEW] [1.1.0] Jython: bundle path not in sys.path when running script from command line

 

Public bug reported:

*********** workaround

# before the first import
import org.sikuli.util.JythonHelper
JythonHelper.get().addSysPath(getBundlePath())

----------------------------------------

When I try to execute my test from the command line I get the following
output:

E:\PDI\Cloud\QAVDC\Sikuli\Portal_Autoservicio>
E:\PDI\Cloud\SikuliX\runsikulix.cmd -r Login.sikuli

[error] script [ E:\PDI\Cloud\QAVDC\Sikuli\Portal_Autoservicio\Login.sikuli ] stopped with error in line 1
[error] ImportError ( No module named config )
However it works wonderfully when I execute it from SikuliX IDE.

conf.py file is in Login.sikuli folder and usually that is enough for
python, shouldn't it be found?

** Affects: sikuli
     Importance: High
     Assignee: RaiMan (raimund-hocke)
         Status: Fix Committed

** Changed in: sikuli
       Status: New => Fix Committed

** Changed in: sikuli
   Importance: Undecided => High

** Changed in: sikuli
     Assignee: (unassigned) => RaiMan (raimund-hocke)

** Changed in: sikuli
    Milestone: None => 1.1.1

** Description changed:

+ *********** workaround
+ 
+ # before the first import
+ import org.sikuli.util.JythonHelper
+ JythonHelper.get().addSysPath(getBundlePath())
+ 
+ ----------------------------------------
+ 
  When I try to execute my test from the command line I get the following
  output:
  
  E:\PDI\Cloud\QAVDC\Sikuli\Portal_Autoservicio>
  E:\PDI\Cloud\SikuliX\runsikulix.cmd -r Login.sikuli
  
  [error] script [ E:\PDI\Cloud\QAVDC\Sikuli\Portal_Autoservicio\Login.sikuli ] stopped with error in line 1
  [error] ImportError ( No module named config )
  However it works wonderfully when I execute it from SikuliX IDE.
  
  conf.py file is in Login.sikuli folder and usually that is enough for
  python, shouldn't it be found?

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1504901

Title:
  [1.1.0] Jython: bundle path not in sys.path when running script from
  command line

Status in Sikuli:
  Fix Committed

Bug description:
  *********** workaround

  # before the first import
  import org.sikuli.util.JythonHelper
  JythonHelper.get().addSysPath(getBundlePath())

  ----------------------------------------

  When I try to execute my test from the command line I get the
  following output:

  E:\PDI\Cloud\QAVDC\Sikuli\Portal_Autoservicio>
  E:\PDI\Cloud\SikuliX\runsikulix.cmd -r Login.sikuli

  [error] script [ E:\PDI\Cloud\QAVDC\Sikuli\Portal_Autoservicio\Login.sikuli ] stopped with error in line 1
  [error] ImportError ( No module named config )
  However it works wonderfully when I execute it from SikuliX IDE.

  conf.py file is in Login.sikuli folder and usually that is enough for
  python, shouldn't it be found?

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1504901/+subscriptions


Follow ups