Error happened open CSI camera with cv2.VideoCapture(0)

why don’t you break the loop if not ret_val?