Open omaryomario opened 6 months ago
Sorry you're having trouble with the Farmer. I looked over the produced Error, I found out it's a bug with the Confidense Level of the Script.
This basically means the max value of an image found on screen that is identical is about 74.7% in this error case.
When I get a chance, I'll update the script to change and check for these extra Lower Confidence errors.
Thank you for submitting this error, and I will get on it as soon as I possibly can. Will keep this open until resolved.
Edited explanation with better description.
Traceback (most recent call last): File "C:\Users\omarb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pyautogui__init.py", line 172, in wrapper return wrappedFunction(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\omarb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pyautogui__init__.py", line 204, in locateCenterOnScreen return pyscreeze.locateCenterOnScreen(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\omarb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pyscreeze__init__.py", line 447, in locateCenterOnScreen coords = locateOnScreen(image, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\omarb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pyscreeze__init__.py", line 405, in locateOnScreen retVal = locate(image, screenshotIm, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\omarb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pyscreeze__init__.py", line 383, in locate points = tuple(locateAll(needleImage, haystackImage, kwargs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\omarb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pyscreeze\init__.py", line 257, in _locateAll_opencv raise ImageNotFoundException('Could not locate the image (highest confidence = %.3f)' % result.max()) pyscreeze.ImageNotFoundException: Could not locate the image (highest confidence = 0.747)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\omarb\Downloads\AFK-Tool\afk-tool.py", line 55, in
afk0 = pyautogui.locateCenterOnScreen('_afk0.png', confidence=0.9)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\omarb\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\pyautogui__init__.py", line 174, in wrapper
raise ImageNotFoundException # Raise PyAutoGUI's ImageNotFoundException.