用Pyautogui识别图片并点击的时候,有时候会报错TypeError: cannot unpack non-iterable NoneType object原因是图片识别不到。解决方法:1.确认图标没有被遮挡或改变2.可以将confidence设置低一些:left, top, width, height = pyautogui.locateOnScreen(1.png',confidence=0.8)