import cv2 as cv
cam = cv.VideoCapture(1)
while True:
success, img = cam.read()
cv.imshow('result', img)
cv.waitKey(0)
cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:967: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'