Code was working okay but suddenly showing this error. While I input image from webcam this happens but if I input a pre-saved image works fine. In the pre-processor, I used int