我尝试在屏幕上找到图像。但它总是表明这一点——
Traceback (most recent call last):
File "C:/Users/MerazulIslam/Desktop/ZOOM_BOT/bot.py", line 20, in <module>
find_btn = pyautogui.locateOnScreen(r'C:\Users\MerazulIslam\Desktop\ZOOM_BOT\Capture.PNG', confidene=0.5)
File "C:\Users\MerazulIslam\AppData\Roaming\Python\Python38\site-packages\pyautogui\__init__.py", line 175, in wrapper
return wrappedFunction(*args, **kwargs)
File "C:\Users\MerazulIslam\AppData\Roaming\Python\Python38\site-packages\pyautogui\__init__.py", line 213, in locateOnScreen
return pyscreeze.locateOnScreen(*args, **kwargs)
File "C:\Users\MerazulIslam\AppData\Roaming\Python\Python38\site-packages\pyscreeze\__init__.py", line 359, in locateOnScreen
screenshotIm = screenshot(region=None) # the locateAll() function must handle cropping to return accurate coordinates, so don't pass a region here.
File "C:\Users\MerazulIslam\AppData\Roaming\Python\Python38\site-packages\pyscreeze\__init__.py", line 134, in wrapper
raise PyScreezeException('The Pillow package is required to use this function.')
pyscreeze.PyScreezeException: The Pillow package is required to use this function.
my code-
import pyautogui
find_btn = pyautogui.locateOnScreen(r'C:\Users\MerazulIslam\Desktop\bot\Capture.PNG')
print(find_btn)
请帮忙!
你可以尝试重新安装一下pyautogui
包含所有依赖项以确保没有遗漏:
pip install --upgrade --force-reinstall pyautogui
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)