下载库后出现Locate屏幕错误

2024-06-25 23:00:37 发布

您现在位置:Python中文网/ 问答频道 /正文

在尝试安装pyobjc内核之前,脚本运行良好。未成功安装,因为windows上的im。。。 locateCenterOnScreen可以工作,但它会抛出一个TypeError,之后看起来像

  File "C:\Users\lucie\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyscreeze\__init__.py", line 333, in locateCenterOnScreen
    return center(coords)
  File "C:\Users\lucie\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyscreeze\__init__.py", line 445, in center
    return Point(coords[0] + int(coords[2] / 2), coords[1] + int(coords[3] / 2))
TypeError: 'NoneType' object is not subscriptable

Tags: initlibpackageslocalsitecoordsusersappdata