AttributeError: 'NoneType' object has no attribute 'shape ...
answers.opencv.org › question › 209433Feb 26, 2019 · AttributeError: 'NoneType' object has no attribute 'shape'. Hi all! I need your help regarding the following code. My goal is to read and show the video with a resolution modification. cap = cv2.VideoCapture("C:/Users/user/Desktop/Foot_Detection/ball_tracking_example.mp4") def rescale_frame(frame, percent=30): width = int(frame.shape[1] * percent/ 100) height = int(frame.shape[0] * percent/ 100) dim = (width, height) return cv2.resize(frame, dim, interpolation =cv2.INTER_AREA)