Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

TypeError:'NoneType' object cannot be interpreted as an integer

Can any one help me in resolving this issue: for contour, hier in zip(itertools.repeat(contours, hierarchy)):

TypeError: 'NoneType' object cannot be interpreted as an integer

my code snippet:

_, contours, hierarchy = cv2.findContours(erosion,cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_SIMPLE)         
for contour, hier in zip(itertools.repeat(contours, hierarchy)):