You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows computer, The Wait_For is failing with exception pyautogui.ImageNotFoundException whereas the except is on ImageHorizonLibrary.errors.ImageNotFoundException #73
On Windows 11
install Robotframework 7.2.2
install robotframework-imagehorizonlibrary with pip3 install robotframework-imagehorizonlibrary
Action:
Run simple RF script like
${xy} Wait For .png 30
Problem:
Exception ImageNotFoundException is raised immediatly without waiting for the end of the timeout (30 sec in this example).
My First analysis:
The instruction
location = self._locate(reference_image, log_it=False)
is raising an exception pyautogui.ImageNotFoundException
whereas the try/except is catching the ImageHorizonLibrary.errors.ImageNotFoundException
so pyautogui.ImageNotFoundException is not catched and the Wait_For exited with ImageNotFoundException.
Expected behaviour:
No exception before the end of the timeout .
Current Workaround:
in file <My_Documents>\AppData\Local\Programs\Python\Python313\Lib\site-packages\ImageHorizonLibrary\recognition_recognize_images.py
ADD:
import pyautogui as ag
REPLACE:
except ImageNotFoundException:
WITH :
except ag.ImageNotFoundException: # "ImageHorizonLibrary.errors.ImageNotFoundException" is different from