python-imagesearch icon indicating copy to clipboard operation
python-imagesearch copied to clipboard

gdi32.GetDIBits() failed

Open GarlicYum opened this issue 5 years ago • 2 comments

ScreenShotError exception is thrown when using region_grabber

GarlicYum avatar Dec 23 '20 07:12 GarlicYum

In fact, I can't use this library at all... Even just copying the simple example:

from python_imagesearch.imagesearch import imagesearch

pos = imagesearch(path) if pos[0] != -1: print("position : ", pos[0], pos[1]) else: print("image not found")

gives me an error: Exception has occurred: AttributeError 'NoneType' object has no attribute 'shape'

GarlicYum avatar Dec 23 '20 10:12 GarlicYum

@Yumtard I'm guessing your path is wrong, try with an absolute path to the image you want to search.

drov0 avatar Jan 23 '21 13:01 drov0