Ayushman Math
Ayushman Math

Reputation: 1

AttributeError: module 'pyautogui' has no attribute 'locateCentreOnScreen'

I have PyAutoGUI-0.9.52 and there no file in the working directory named pyautogui. I have pillow installed, but still, it shows this error please can someone help me.

This is the full error:

Traceback (most recent call last):
  File "C:\Users\Admin\Desktop\lolllll.py", line 4, in <module>
    pyautogui.click(pyautogui.locateCentreOnScreen('launcher.png'))
AttributeError: module 'pyautogui' has no attribute 'locateCentreOnScreen'

If there is no solution please suggest a different module which can do this. But I would prefer to stick with this.

Upvotes: 0

Views: 1336

Answers (1)

Hedgy
Hedgy

Reputation: 356

We can't help you without code. However, a simple google search results in the fact that you mistyped, and the function is pyautogui.locateCenterOnScreen(...), with a properly spelled center.

Upvotes: 1

Related Questions