TypeError: stat: path should be string, bytes, os.PathLike or integer, not cv2.VideoCapture

thanks for advice

    boxes,_ = mtcnn.detect(frame_pil)
... 
    for box in boxes:

The first error is likely because you are not checking

if boxes is not None:
    for box in boxes:
1 Like