使用pyautogui模块遇到问题
- 1、显示不是pip的问题
- 2、 网络环境不好的地方都需要使用国内镜像:pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out
- 3、0.9.54版本的pyautogui如果直接使用click函数会报错:
- 4、图像没找到异常:pyscreeze.ImageNotFoundException: Could not locate the image (highest confidence = 0.606)
- 5、if isinstance(x, collections.Sequence):
- 6、TypeError: cannot unpack non-iterable NoneType object
- 7、使用click函数clicks设置为2,如果没对python代码使用管理员权限,只会单击1次。
- 8、当需要定位的图标不在打开的页面,需要滚动条滚到才能到时,先click函数,再dragTo函数
1、显示不是pip的问题
note: This error originates from a subprocess, and is likely not a problem with pip.
清理缓存:pip cache purge
2、 网络环境不好的地方都需要使用国内镜像:pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=‘files.pythonhosted.org’, port=443): Read timed out
pip install 模块名 -i https://pypi.tuna.tsinghua.edu.cn/simple
3、0.9.54版本的pyautogui如果直接使用click函数会报错:
报错:pyautogui.FAILSAFE要设置成False
pyautogui.FAILSAFE=False
pyautogui.click(x=150,y=150,duration=3,clicks=2,interval=0.25,button=‘left’)

最低0.47元/天 解锁文章
1314

被折叠的 条评论
为什么被折叠?



