0
How to correct Attribute Error?
from PIL import ImageGrab , ImageOps import pyauto from numpy import * class cordinates (): replayBtn = (340,390) dinasaur = (171,395) # 240 =x cordinates to check for tree # y cordinates = 420 def restartGame(): pyauto.click(cordinates.replayBtn) def pressSpace(): pyauto.keydown('space') timesleep(0,0.5) print("jump") pyauto.keyUp('space') def ImageGrab(): box = (cordinates.dinasaur[0]+240,cordinates.dinasaur[1],cordinates.dinasaur[0]+280,cordinates.dinasaur[1],30) image = ImageGrab.grab(box) grayImage = imageOps.grayscale(image) a = array(grayImage.getcolors()) print(a.sum()) while True : ImageGrab()
1 Odpowiedź
0
copy the error message