报错:
OSError: Failed to read D:\STEFANOS\python oolsuto\icons\jupyter.png because file is missing, has improper permissions, or is an unsupported or invalid format
[ WARN:0@54.445] global loadsave.cpp:241 cv::findDecoder imread_('D:\STEFANOS\python oolsuto\icons\jupyter.png'): can't open/read file: check file path/integrity
程序:
import pyautogui
#import pyperclip
import time
def open_jupyter():
print('Opening jupyter...')
time.sleep(1)
try:
location = pyautogui.locateOnScreen("D:\STEFANOS\python\tools\auto\icons\jupyter.png",confidence=0.5)
print(location)
pyautogui.click(location)
except pyautogui.ImageNotFoundException:
print("Sorry I cannot locate Jupyter")
time.sleep(1)
open_jupyter()