Skip to content

为啥我有好几个报错呀请问,不太会编程 #2

@De1fine

Description

@De1fine

Traceback (most recent call last):
File "C:\Users\admin\Desktop\ApexFarmingBot-main\good.py", line 319, in
main()
File "C:\Users\admin\Desktop\ApexFarmingBot-main\good.py", line 229, in main
auto_click_button(0.8, f"./{resolution}/fillTeam.png", 3, 0.25)
File "C:\Users\admin\Desktop\ApexFarmingBot-main\good.py", line 29, in auto_click_button
x, y = pyautogui.locateCenterOnScreen(pic_name, confidence = conf_level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tool\PythonPython312\Lib\site-packages\pyautogui_init_.py", line 172, in wrapper
return wrappedFunction(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tool\PythonPython312\Lib\site-packages\pyautogui_init_.py", line 204, in locateCenterOnScreen
return pyscreeze.locateCenterOnScreen(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tool\PythonPython312\Lib\site-packages\pyscreeze_init_.py", line 447, in locateCenterOnScreen
coords = locateOnScreen(image, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tool\PythonPython312\Lib\site-packages\pyscreeze_init_.py", line 405, in locateOnScreen
retVal = locate(image, screenshotIm, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tool\PythonPython312\Lib\site-packages\pyscreeze_init_.py", line 383, in locate
points = tuple(locateAll(needleImage, haystackImage, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\tool\PythonPython312\Lib\site-packages\pyscreeze_init_.py", line 273, in _locateAll_pillow
raise NotImplementedError('The confidence keyword argument is only available if OpenCV is installed.')
NotImplementedError: The confidence keyword argument is only available if OpenCV is installed.

进程已结束,退出代码为 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions