파이썬 pyautogui 관련 질문
-
게시물 수정 , 삭제는 로그인 필요
제 코드가
import pyautogui
import time
png = "so1.png"
con = 1
try:
res = pyautogui.locateOnScreen(png,confidence=con,region=(1300,400,600,700))
except pyautogui.ImageNotFoundException:
print('NotFound')
time.sleep(2)
이거고
에러로
Traceback (most recent call last):
File "C:\Users\minja\AppData\Roaming\Python\Python311\site-packages\pyautogui\__init__.py", line 172, in wrapper
return wrappedFunction(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\minja\AppData\Roaming\Python\Python311\site-packages\pyautogui\__init__.py", line 204, in locateCenterOnScreen
return pyscreeze.locateCenterOnScreen(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\minja\AppData\Roaming\Python\Python311\site-packages\pyscreeze\__init__.py", line 447, in locateCenterOnScreen
coords = locateOnScreen(image, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\minja\AppData\Roaming\Python\Python311\site-packages\pyscreeze\__init__.py", line 405, in locateOnScreen
retVal = locate(image, screenshotIm, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\minja\AppData\Roaming\Python\Python311\site-packages\pyscreeze\__init__.py", line 383, in locate
points = tuple(locateAll(needleImage, haystackImage, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\minja\AppData\Roaming\Python\Python311\site-packages\pyscreeze\__init__.py", line 257, in _locateAll_opencv
raise ImageNotFoundException('Could not locate the image (highest confidence = %.3f)' % result.max())
pyscreeze.ImageNotFoundException: Could not locate the image (highest confidence = 0.000)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Users\minja\OneDrive\ ȭ \ ڵ \mts.py", line 12, in <module>
res = t.locateCenterOnScreen(png,confidence=con,region=(1450,520,260,70))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\minja\AppData\Roaming\Python\Python311\site-packages\pyautogui\__init__.py", line 174, in wrapper
raise ImageNotFoundException # Raise PyAutoGUI's ImageNotFoundException.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pyautogui.ImageNotFoundException
이런게 뜨거든요...
이게 왜 이러는지랑 어떻게 해결하는지 질문해봅니다..
#파이썬 pyautogui #파이썬 pyautogui 설치 #파이썬 pyautogui 키보드 #파이썬 pyautogui 이미지 인식 #파이썬 pyautogui 스크린샷 #파이썬 pyautogui 마우스 위치 #파이썬 pyautogui 키보드 입력 감지 #파이썬 pyautogui 스크롤 #파이썬 pyautogui 오프라인 설치 #파이썬 pyautogui 듀얼모니터