Sikuli hangs on the third script when importing four scripts into my main

Asked by Jason

I have a main script I am trying to run from the sikuli IDE 1.01. The main script is using the import function to import other scripts. I am able to run each script individually with no issues. However, when I run the main script with the imports the script hangs forever when it reaches the third script.(script 1 and 2 run perfectly) It does not fail and there are no errors when I manually stop the script after many minutes of waiting using "ALT-SHIFT-C". PLEASE HELP! :)

Example:

#script1.sikuli
from sikuli import *
import os
import shutil

for root, dirs, files in os.walk("some\\location\\"):
    for f in files:
     os.unlink(os.path.join(root, f))
    for d in dirs:
     shutil.rmtree(os.path.join(root, d))
wait(5)

#script2.sikuli
from sikuli import *
App.open("C:\\some\\location")
wait(5)

#script3.sikuli
from sikuli import *
App.open("C:\\some\\location")
wait(5)

#script4.sikuli
from sikuli import *
App.focus("someapp")
click(someimage)
click(someimage)
wait(5)

#mainScript.sikuli

import script1
reload script1

import script2
reload script2

import script3
reload script3

import script4
reload script4

wait(5)
exit(1)

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Jason
Solved:
Last query:
Last reply:
Revision history for this message
Jason (jasonnaviello) said :
#1

I was able to solve the issue by adding a setAutoWaitTimeout() to script 3 :)