sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #56630
[Bug 1527243] Re: wait function from imported files do not execute
** Changed in: sikuli
Status: New => Opinion
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1527243
Title:
wait function from imported files do not execute
Status in Sikuli:
Opinion
Bug description:
Hi
I am trying to import a function written in a Sikuli file which has an wait function with image file as its parameter.
When I try and import this function in another Sikuli program, it throws exception. I have given both the programs and the result. I did not get any help with this kind of coding.
I am new in this tool and if there are any mistakes in it please point
it out. If i do not use the wait function with in File1, it works
fine. Not at all sure what cause the issues.
Please help me
Sikuli Version: Sikuli-IDE-win32-0.10.2
Java Version: jre1.8.0_66
File 1: Which I am importing
from sikuli.Sikuli import *
def OPENCALC():
openApp("calc.exe")
wait(image1 ,10)
File 2: In which I am importing the above file
from sikuli.Sikuli import *
from Sikuli_Scripts import*
import os
myPath=os.path.dirname(getBundlePath())
if not myPath in sys.path: sys.path.append(myPath)
myScriptPath="D:\\Ashwin\\Sikuli\\Sikuli_Scripts.sikuli"
if not myScriptPath in sys.path: sys.path.append(myScriptPath)
print "Hello World1"
import Sikuli_Scripts
reload(Sikuli_Scripts)
#from Sikuli_Scripts import *
Sikuli_Scripts.OPENCALC()
The result of the execution in Sikuli IDE is shown below;
Hello World1
[sikuli] Stopped
[sikuli] An error occurs at line 12
[sikuli] Error message:
Traceback (most recent call last):
File "C:\Users\346318\AppData\Local\Temp\sikuli-tmp3370183120675238204.py", line 12, in <module>
Sikuli_Scripts.OPENCALC()
File "D:\Ashwin\Sikuli\Sikuli_Scripts.sikuli\Sikuli_Scripts.py", line 4, in OPENCALC
wait("1450354723310.png",10)
File "D:\Ashwin\Sikuli-IDE-win32-0.10.2\Sikuli-IDE\sikuli-script.jar\Lib\sikuli\Region.py", line 94, in wait
Line 12, in file C:\Users\346318\AppData\Local\Temp\sikuli-tmp3370183120675238204.py
at edu.mit.csail.uid.Region.wait(Region.java:240)
at
org.python.proxies.sikuli.Region$Region$1.super__wait(Unknown Source)
at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown
Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
edu.mit.csail.uid.FindFailed: FindFailed: 1450354723310.png can't be found.
Line 12, in file C:\Users\346318\AppData\Local\Temp\sikuli-tmp3370183120675238204.py
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1527243/+subscriptions
References