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

Bug #1445385 reported by RaiMan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Fix Committed
Critical
RaiMan

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

RaiMan (raimund-hocke)
Changed in sikuli:
status: New → Fix Committed
importance: Undecided → High
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.0
RaiMan (raimund-hocke)
summary: [1.1.0] Unable to use 'capture()' function if Sikulix-IDE is not running
+ --- fixed 2015-04-18
Changed in sikuli:
importance: High → Critical
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.