Error explanation FLANN

Hi there,

Has anyone ever had this type of error while using SURF & FLANN (with Python) ?

Traceback (most recent call last):
  File "", line 308, in <module>
cv2.error: OpenCV(4.4.0) C:\opencv-4.4.0\opencv-4.4.0\modules\flann\include\opencv2\flann\nn_index.h:72: error: (-215:Assertion failed) queries.cols == veclen() in function 'cvflann::NNIndex<struct cvflann::L2<float> >::knnSearch'

line 308

matches = flann.knnMatch(np.asarray(c.des, np.float32), np.asarray(des, np.float32), 2)

c.des is my cropped image (the reference I use to compare) and des is my current frame.

Because during all my tests, I never had it, and today I have it one time in two and I don’t understand why.
I suppose it happens when my image has no keypoints or descriptors but I need a confirmation or an explanation

that would be wrong for both.
not an image, but a collection of SURF descriptors should go there instead

Yes sorry, I wasn’t very explicit but of course it is. That’s why the variables are called c.des and des actually so don’t worry on this side !

print out sizes / types for both arrays
somehow the cols do not match (probably one is empty)