Open aa3507943 opened 2 years ago
I have the same problem. Tought i did something wrong because im new to it.
pyautogui 0.9.53
` import cv2 as cv import pyautogui
pos = pyautogui.position() pyautogui.screenshot('screenshot.png' )
screenshot = cv.imread("screenshot.png") screenshot = cv.resize(screenshot, (0, 0),fx=0.5,fy=0.5) cv.imshow("Testing", screenshot) cv.waitKey(0)`
After using pyautogui.screenshot() function, if there are still codes behind it, they will be unreachable. Please help to verify it
Rolling back to Pylance version 2022.2.1 solved the problem.
But it seems not to be unreachable. The IDE says so, but when you do this:
import pyautogui as pg
import cv2 as cv
capture = pg.screenshot()
print('test')
The 'test' will still be printed..
After using pyautogui.screenshot() function, if there are still codes behind it, they will be unreachable. Please help to verify it