import pyautogui
import time
def pause():
time.sleep(0.001)
while True:
pyautogui.keyDown('down')
time.sleep(5)
给我错误
C:\Python27\python.exe E:/Python/win32/pythongui.py
Traceback (most recent call last):
File "E:/Python/win32/pythongui.py", line 1, in <module>
import pyautogui
File "E:\Python\win32\pyautogui.py", line 45, in <module>
screenWidth, screenHeight = pyautogui.size()
AttributeError: 'module' object has no attribute 'size'
Process finished with exit code 1
我不明白为什么会出现这个错误,我什至没有调用属性大小,昨天一切正常。今天出于某种奇怪的原因,我不断收到此错误。pyautogui 工作时的代码与以前完全相同。