Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

Error with pyautogui (image locator)

Trying to figure out why I'm getting this error "TypeError: _locateAll_python() got an unexpected keyword argument 'confidence'"


Code
def main():
    while pyautogui.locateOnScreen('spikes.png', confidence=0.8) is not None:
      print("I see it")
      pyautogui.moveTo(1843, 82)
      pyautogui.click(1843, 82)
      #move to stair recognition
      stairs()
    else:
        print(" I don't see it")

For some reason it's not liking the confidence part?


Update: I figured out both errors. I needed OpenCV as well.

Closing thread.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by Luffy-_-Aug 20, 2023 02:45 AM 3 297 Aug 20, 2023 02:45 AM
Last Post: Lucky4L
[Python] by TrkDZFeb 16, 2022 10:22 AM 7 249 Feb 16, 2022 10:22 AM
Last Post: QProxies
[Python] by permutateNov 5, 2020 09:15 AM 8 307 Nov 5, 2020 09:15 AM
Last Post: permutate