ERROR: object of type 'NoneType' has no len()
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\1.py", line 22, in
img = img.drawKeypointMatches(Image("box.jpg"))
File "C:\Users\qbx2\Python27\lib\site-packages\SimpleCV\ImageClass.py", line 7496, in drawKeypointMatches
skp,sd = self._getRawKeypoints(thresh)
File "C:\Users\qbx2\Python27\lib\site-packages\SimpleCV\ImageClass.py", line 7370, in _getRawKeypoints
if( len(self._mKPDescriptors) == 0 ):
TypeError: object of type 'NoneType' has no len()
ERROR: object of type 'NoneType' has no len() Traceback (most recent call last): File "C:\Users\Administrator\Desktop\1.py", line 22, in
img = img.drawKeypointMatches(Image("box.jpg"))
File "C:\Users\qbx2\Python27\lib\site-packages\SimpleCV\ImageClass.py", line 7496, in drawKeypointMatches
skp,sd = self._getRawKeypoints(thresh)
File "C:\Users\qbx2\Python27\lib\site-packages\SimpleCV\ImageClass.py", line 7370, in _getRawKeypoints
if( len(self._mKPDescriptors) == 0 ):
TypeError: object of type 'NoneType' has no len()
around line 7370:
I have changed if( len(self._mKPDescriptors) == 0 ): to if( self._mKPDescriptors == None or len(self._mKPDescriptors) == 0 ): and now it works well