Resolving  OpenCv runtime error - AttributeError: 'NoneType' object has no attribute 'copy'

Resolving OpenCv runtime error - AttributeError: 'NoneType' object has no attribute 'copy'

The problem could be because of passing invalid image or path or issue with the image file.
1. Wrong image path to the cv2.imread function
2. Problem reading a frame from webcam or video file using cv2.VideoCapture

To solve the issue one should check the file manually for any corruption. Verify the physical path of the file and provided path in the command line argument.