import cv2
cap = cv2.VideoCapture(0)
while (True):
ret,frame = cap.read()
cv2.imshow('Webcam', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
breakcv2.error: OpenCV(3.4.3) /io/opencv/modules/highgui/src/window.cpp:356: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'imshow'