I got the error 'module' object has no attribute 'DescriptorExtractor_create'
I would like to know the version of your opencv.
It is a little strange that :
sift=cv2.xfeatures2d.SIFT_create(nfeatures=nfeatures)
but you still use cv2.DescriptorExtractor_create("OpponentSIFT")
Thanks for your attention