from python_imagesearch.imagesearch import imagesearch
pos = imagesearch("./github.png")
if pos[0] != -1:
print("position : ", pos[0], pos[1])
else:
print("image not found")
this is the simple code that I wrote along with the tutorial
but I am getting this error.
Display Type: Built-in Liquid Retina XDR Display
Resolution: 3456 x 2234 Retina
Traceback (most recent call last):
File "/Users/vick/IT/MachineLearning/ImageRecognition/Tutorial.py", line 3, in <module>
pos = imagesearch("./github.png")
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/python_imagesearch/imagesearch.py", line 124, in imagesearch
im.thumbnail((round(im.size[0] * 0.5), round(im.size[1] * 0.5)))
^^^^^^^^^^^^
AttributeError: 'ScreenShot' object has no attribute 'thumbnail'
what is happening?
As I am just trying out this image recognition and stuff for a bot I wanted to write, I have no idea what is happening.
New contributor
Vick Michel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1