annot unpack non-iterable nonetype object

Viewed 8
import pyautogui
import time
for i in range(20):
    x, y= pyautogui.locateCenterOnScreen("threeDots.png", confidence = 1)
    pyautogui.moveTo(x, y, duration= 0.5 )
    pyautogui.leftClick()
    time.sleep(0.5)
   
    
    x, y= pyautogui.locateCenterOnScreen("Unfriend.png", confidence = 1)
    pyautogui.moveTo(x, y, duration= 0.5 )
    pyautogui.leftClick()
    time.sleep(0.5)

line 4, in x, y= pyautogui.locateCenterOnScreen("threeDots.png", confidence = 1) TypeError: cannot unpack non-iterable NoneType object

0 Answers
Related