OpenCV NoneType object has no attribute shape

It means that somewhere a function which should return a image just returned None and therefore has no shape attribute. Try “print img” to check if your image is None or an actual numpy object.

Leave a Comment