← Back to team overview

sikuli-driver team mailing list archive

[Question #706028]: Sikuli script stops working without throwing any error or any exception, it just waits where there is no wait function

 

New question #706028 on SikuliX:
https://answers.launchpad.net/sikuli/+question/706028

I have written a Sikuli Script, the script is working fine on windows 10, all the methods and functions used are working totally fine.
But when i run the same script on Windows Server 2012 with Media Foundation installed, the script runs and it can find the images which are needed, But the script keeps on waiting after 3/4 runs in the middle of the loop and does not throw any kind of error or any exception, it just waits, where i am not using any wait() function


Script is something like it collects or fetches data from a Region using Region.text()
Below is the sample code structure :

if len(mrn) !=0:
    for i in mrn:
        wait(1)
        name = Region.text()
        age = Region.text()
        phone_number = Region.text()
        address = Region.text()
        dob = Region.text()

What happens is in the first 3 runs of the loop , the data is being fetched successfully and correctly, then on 4th run or maybe subsequent run in the loop, it waits and keeps on waiting. 
for example-
1st run - name, age, phone_number, address, dob is fetched
2nd run - name, age, phone_number, address, dob is fetched
3rd run - name, age, phone_number, address, dob is fetched
4th run - name, age is fetched, but keeps on waiting afterwards to fetch phone_number without throwing any error
If I bypass, say phone_number = ' ', then 
4th run - name, age, phone_number, address, dob is fetched
and in the 5th run
5th run - name, age, phone_number, address is fetched, but keeps on waiting afterwards to fetch dobwithout throwing any error

What am i doing wrong, I have put every attributes i.e., name, age, phone_number, address, dob inside try and except block, but still facing this issue

Is there any way that we can wait for 5 seconds for fetching each attribute, if the scripts waits for 5 seconds and didnot fetched any data, we can move on to other attribute to be fetched. Example, in the 4th run, while fetching phone_number the scripts unexpectedly waits, Here we can check if in between 5 seconds, phone number is not fetched, we can set phone_number = '' and continue to fetch other details as required.

Note: Keep in mind before answering that the same script runs perfectly on Windows 10, but on Windows Server 2012 with Media Foundation installed and being able to find images and read texts from Region, unexpectedly waits and waits without throwing any error or exception. I have to force stop the program using CTRL+C on command line

Thank you, any help would be appreciated.




-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.