import Tkinter as ImageTk
C:\Python27\python.exe D:/games/bot-master/t.py
Traceback (most recent call last):
File "D:/games/bot-master/t.py", line 99, in <module>
loop()
File "D:/games/bot-master/t.py", line 88, in loop
photo = PhotoImage(img)
File "C:\Python27\lib\lib-tk\Tkinter.py", line 3371, in __init__
Image.__init__(self, 'photo', name, cnf, master, **kw)
File "C:\Python27\lib\lib-tk\Tkinter.py", line 3310, in __init__
if not name:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()<PIL.PngImagePlugin.PngImageFile image mode=RGB size=800x418 at 0x11F9C128>screen = ImageGrab.grab(box)
img = array(screen.getdata(), dtype=uint8).reshape((screen.size[1], screen.size[0], 3))
return imgscreen = ImageGrab.grab(box)
img = array(screen.getdata(), dtype=uint8).reshape((screen.size[1], screen.size[0], 3))
return screen,imgscreen,img = get_screen(
window_info["x"],
window_info["y"],
window_info["x"] + window_info["width"],
window_info["y"] + window_info["height"]
)
photo = PhotoImage(screen)File "D:/games/bot-master/t.py", line 91, in loop
photo.pack()
AttributeError: PhotoImage instance has no attribute 'pack'<PIL.Image.Image image mode=RGB size=1152x872 at 0xC909358><PIL.PngImagePlugin.PngImageFile image mode=RGB size=800x418 at 0x11F9C128>