sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #49971
[Bug 1810639] [NEW] Capture does not always work / directory missing
Public bug reported:
I found the script sometimes break at:
img = capture(Region(1372,119,536,798))
print img
exit()
with the error:
java.io.FileNotFoundException: C:\Users\_badboi\AppData\Local\Temp\Sikulix_139865951\sikuliximage-1546764694493.png (Das System kann den angegebenen Pfad nicht finden)
at java.io.RandomAccessFile.open0(Native Method)
at java.io.RandomAccessFile.open(Unknown Source)
at java.io.RandomAccessFile.<init>(Unknown Source)
at javax.imageio.stream.FileImageOutputStream.<init>(Unknown Source)
at com.sun.imageio.spi.FileImageOutputStreamSpi.createOutputStreamInstance(Unknown Source)
at javax.imageio.ImageIO.createImageOutputStream(Unknown Source)
at javax.imageio.ImageIO.write(Unknown Source)
at org.sikuli.basics.FileManager.saveTimedImage(FileManager.java:560)
at org.sikuli.script.ScreenImage.save(ScreenImage.java:92)
at org.sikuli.script.ScreenImage.getFile(ScreenImage.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Me
thod.invoke(Unknown Source)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:188)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:206)
at org.python.core.PyObject.__call__(PyObject.java:480)
at org.python.core.PyObject.__call__(PyObject.java:484)
at org.python.core.PyMethod.__call__(PyMethod.java:126)
at sikuli.Sikuli$py.capture$4(C:/Users/_badboi/AppData/Roaming/Sikulix/Lib/sikuli/Sikuli.py:58)
at sikuli.Sikuli$py.call_function(C:/Users/_badboi/AppData/Roaming/Sikulix/Lib/sikuli/Sikuli.py)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
at org.python.core.PyBaseCode.call(PyBaseCode.java:132)
at org.python.core.PyFunction.__call__(PyFunction.java:413)
at org.python.pycode._pyx624.f$0(C:/temp/SikuliX/test.sikuli/test.py:138)
at org.python.pycode._pyx624.call_function(C:/temp/SikuliX/test.sikuli/test.py)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.
[info] Exit code: 0
python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1614)
at org.python.core.__builtin__.execfile_flags(__builtin__.java:535)
at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:286)
at org.sikuli.scriptrunner.JythonScriptRunner.runPython(JythonScriptRunner.java:220)
at org.sikuli.scriptrunner.JythonScriptRunner.runScript(JythonScriptRunner.java:189)
at org.sikuli.ide.SikuliIDE$ButtonRun$SubRun.run(SikuliIDE.java:2601)
at java.lang.Thread.run(Unknown Source)
To resolve it, I can either restart the IDE (1.1.4 on Win10), or simply create the directory (in this example) Sikulix_139865951.
I was not able to find out under which conditions SIKULIX failed to add that that temp-directory.
** Affects: sikuli
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1810639
Title:
Capture does not always work / directory missing
Status in Sikuli:
New
Bug description:
I found the script sometimes break at:
img = capture(Region(1372,119,536,798))
print img
exit()
with the error:
java.io.FileNotFoundException: C:\Users\_badboi\AppData\Local\Temp\Sikulix_139865951\sikuliximage-1546764694493.png (Das System kann den angegebenen Pfad nicht finden)
at java.io.RandomAccessFile.open0(Native Method)
at java.io.RandomAccessFile.open(Unknown Source)
at java.io.RandomAccessFile.<init>(Unknown Source)
at javax.imageio.stream.FileImageOutputStream.<init>(Unknown Source)
at com.sun.imageio.spi.FileImageOutputStreamSpi.createOutputStreamInstance(Unknown Source)
at javax.imageio.ImageIO.createImageOutputStream(Unknown Source)
at javax.imageio.ImageIO.write(Unknown Source)
at org.sikuli.basics.FileManager.saveTimedImage(FileManager.java:560)
at org.sikuli.script.ScreenImage.save(ScreenImage.java:92)
at org.sikuli.script.ScreenImage.getFile(ScreenImage.java:75)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Me
thod.invoke(Unknown Source)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:188)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:206)
at org.python.core.PyObject.__call__(PyObject.java:480)
at org.python.core.PyObject.__call__(PyObject.java:484)
at org.python.core.PyMethod.__call__(PyMethod.java:126)
at sikuli.Sikuli$py.capture$4(C:/Users/_badboi/AppData/Roaming/Sikulix/Lib/sikuli/Sikuli.py:58)
at sikuli.Sikuli$py.call_function(C:/Users/_badboi/AppData/Roaming/Sikulix/Lib/sikuli/Sikuli.py)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
at org.python.core.PyBaseCode.call(PyBaseCode.java:132)
at org.python.core.PyFunction.__call__(PyFunction.java:413)
at org.python.pycode._pyx624.f$0(C:/temp/SikuliX/test.sikuli/test.py:138)
at org.python.pycode._pyx624.call_function(C:/temp/SikuliX/test.sikuli/test.py)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.
[info] Exit code: 0
python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1614)
at org.python.core.__builtin__.execfile_flags(__builtin__.java:535)
at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:286)
at org.sikuli.scriptrunner.JythonScriptRunner.runPython(JythonScriptRunner.java:220)
at org.sikuli.scriptrunner.JythonScriptRunner.runScript(JythonScriptRunner.java:189)
at org.sikuli.ide.SikuliIDE$ButtonRun$SubRun.run(SikuliIDE.java:2601)
at java.lang.Thread.run(Unknown Source)
To resolve it, I can either restart the IDE (1.1.4 on Win10), or simply create the directory (in this example) Sikulix_139865951.
I was not able to find out under which conditions SIKULIX failed to add that that temp-directory.
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1810639/+subscriptions
Follow ups