Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i keep getting this what do i do to fix it #1

Open
hacker0529 opened this issue Nov 23, 2023 · 1 comment
Open

i keep getting this what do i do to fix it #1

hacker0529 opened this issue Nov 23, 2023 · 1 comment

Comments

@hacker0529
Copy link

File "C:\Users\oxeyt\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyautogui_init_.py", line 172, in wrapper
return wrappedFunction(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\oxeyt\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyautogui_init_.py", line 210, in locateOnScreen
return pyscreeze.locateOnScreen(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\oxeyt\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyscreeze_init_.py", line 405, in locateOnScreen
retVal = locate(image, screenshotIm, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\oxeyt\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyscreeze_init_.py", line 383, in locate
points = tuple(locateAll(needleImage, haystackImage, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\oxeyt\AppData\Local\Programs\Python\Python312\Lib\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.217)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\oxeyt\Downloads\ApexFarming-main\ApexFarmer.py", line 10, in
if pyautogui.locateOnScreen('ManuNotReady.png', region=(0,538,447,528), grayscale=True, confidence=0.7) != None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\oxeyt\AppData\Local\Programs\Python\Python312\Lib\site-packages\pyautogui_init_.py", line 174, in wrapper
raise ImageNotFoundException # Raise PyAutoGUI's ImageNotFoundException.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pyautogui.ImageNotFoundException

@GromeQ
Copy link

GromeQ commented Dec 10, 2023

So I was fighting with this error over 10 hours. And I have found the problem...
Libraries of Pillow / pyScreeze do not install to the newest version and this is only one way now to go around it:

  1. in CMD use >pip freeze< to check your libraries versions.
  2. Unistall (you need to open CMD as an admin) >pip unistall Pillow< if version is not same as mentioned bellow.
  3. Install proper and working libraries like mentioned bellow >pip install PyScreeze==0.1.28<

Pillow==9.3.0
PyAutoGUI==0.9.53
PyScreeze==0.1.28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants