← Back to team overview

sikuli-driver team mailing list archive

[Bug 1445385] Re: [1.1.0] Unable to use 'capture()' function if Sikulix-IDE is not running --- fixed 2015-04-18

 

** Summary changed:

- [1.1.0] Unable to use 'capture()' function if Sikulix-IDE is not running
+ [1.1.0] Unable to use 'capture()' function if Sikulix-IDE is not running --- fixed 2015-04-18

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

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

Title:
  [1.1.0] Unable to use 'capture()' function if Sikulix-IDE is not
  running --- fixed 2015-04-18

Status in Sikuli:
  Fix Committed

Bug description:
  When I try to use the 'capture()' keyword outside of the Sikulix-IDE I
  get the following error:

  >>> print capture(Region(0, 0, 50, 50))
  java.io.FileNotFoundException: C:\Users\aidma\AppData\Local\Temp\Sikulix\sikuliximage-1429193157686.png (The system cannot find the path specified)
          at java.io.RandomAccessFile.open(Native Method)
          at java.io.RandomAccessFile.<init>(RandomAccessFile.java:241)
          at javax.imageio.stream.FileImageOutputStream.<init>(FileImageOutputStream.java:69)
          at com.sun.imageio.spi.FileImageOutputStreamSpi.createOutputStreamInstance(FileImageOutputStreamSpi.java:55)
          at javax.imageio.ImageIO.createImageOutputStream(ImageIO.java:419)
          at javax.imageio.ImageIO.write(ImageIO.java:1530)
          at org.sikuli.basics.FileManager.saveTimedImage(FileManager.java:526)
          at org.sikuli.script.ScreenImage.save(ScreenImage.java:91)
          at org.sikuli.script.ScreenImage.getFile(ScreenImage.java:78)
          at org.sikuli.script.ScreenImage.getFilename(ScreenImage.java:69)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:186)
          at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:204)
          at org.python.core.PyObject.__call__(PyObject.java:461)
          at org.python.core.PyObject.__call__(PyObject.java:465)
          at org.python.core.PyMethod.__call__(PyMethod.java:126)
          at sikuli.Sikuli$py.capture$24(C:\SikuliX\sikulixapi.jar\Lib\sikuli\Sikuli.py:324)
          at sikuli.Sikuli$py.call_function(C:\SikuliX\sikulixapi.jar\Lib\sikuli\Sikuli.py)
          at org.python.core.PyTableCode.call(PyTableCode.java:167)
          at org.python.core.PyBaseCode.call(PyBaseCode.java:307)
          at org.python.core.PyBaseCode.call(PyBaseCode.java:131)
          at org.python.core.PyFunction.__call__(PyFunction.java:413)
          at org.python.pycode._pyx149.f$0(<stdin>:1)
          at org.python.pycode._pyx149.call_function(<stdin>)
          at org.python.core.PyTableCode.call(PyTableCode.java:167)
          at org.python.core.PyCode.call(PyCode.java:18)
          at org.python.core.Py.runCode(Py.java:1374)
          at org.python.core.Py.exec(Py.java:1418)
          at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:279)
          at org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter.java:131)
          at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java:116)
          at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java:62)
          at org.python.util.InteractiveConsole.push(InteractiveConsole.java:165)
          at org.python.util.InteractiveConsole.interact(InteractiveConsole.java:146)
          at org.python.util.jython.run(jython.java:396)
          at org.python.util.jython.main(jython.java:145)

  I think the problem is that the "\Sikulix\" folder is not being
  created.

  Using 'capture()' in the Sikulix-IDE works.  And, while the IDE is
  running, I can see that the "\Sikulix\" folder exists. Additionally,
  'capture()' works from external Jython scripts *so long as* the IDE is
  running.

  But once I close the IDE, "\Sikulix\" gets deleted, and 'capture()'
  ceases to work from external scripts.

  SYSTEM INFO:
  - Using Windows Server 2012 R2
  - Using Sikuli Nightly from: sikulixsetup-1.1.0-20150415.231201-39-forsetup.jar

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


References