[Solved]: StopIteration: module 'scipy' has no attribute 'ndimage'

ERROR:

StopIteration: module 'scipy' has no attribute 'ndimage'

Solution: You have to import the  following module:

import scipy.ndimage