When I tried to use this function, it returned a ValueError
File "C:\Users\Administrator\Desktop\Teste\localize.py", line 21, in <module>
position = pyautogui.locateOnWindow('connect-wallet.png', title=title)
File "C:\Users\Administrator\Desktop\Teste\venv\lib\site-packages\pyautogui\__init__.py", line 175, in wrapper
return wrappedFunction(*args, **kwargs)
File "C:\Users\Administrator\Desktop\Teste\venv\lib\site-packages\pyautogui\__init__.py", line 219, in locateOnWindow
return pyscreeze.locateOnWindow(*args, **kwargs)
File "C:\Users\Administrator\Desktop\Teste\venv\lib\site-packages\pyscreeze\__init__.py", line 434, in locateOnWindow
return locateOnScreen(image, region=(win.left, win.top, win.width, win.height), **kwargs)
File "C:\Users\Administrator\Desktop\Teste\venv\lib\site-packages\pyscreeze\__init__.py", line 373, in locateOnScreen
retVal = locate(image, screenshotIm, **kwargs)
File "C:\Users\Administrator\Desktop\Teste\venv\lib\site-packages\pyscreeze\__init__.py", line 353, in locate
points = tuple(locateAll(needleImage, haystackImage, **kwargs))
File "C:\Users\Administrator\Desktop\Teste\venv\lib\site-packages\pyscreeze\__init__.py", line 219, in _locateAll_opencv
raise ValueError('needle dimension(s) exceed the haystack image or region dimensions')
ValueError: needle dimension(s) exceed the haystack image or region dimensions ```
What does this PR do?
Fix the
pyautogui.locateOnWindow()
Why was it initiated?
When I tried to use this function, it returned a ValueError