W
W
Whois2016-06-08 11:15:06
Python
Whois, 2016-06-08 11:15:06

How to fix "object has no attribute" error in Python?

The error itself is:
Traceback (most recent call last):
File "./example.py", line 26, in
cv = cv2.SURF( 400 )
AttributeError: 'module' object has no attribute 'SURF'
What could be the problem?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
W
Whois, 2016-06-08
@andrey_id123456789

Reinstalling OpenCV helped.

J
JRazor, 2016-06-08
@JRazor

cv2 (whatever it is) does not have the SURF attribute you are trying to call.

A
Alexander, 2016-06-08
@Avernial

Check the version of OpenCV, in new versions some modules have been moved to a separate opencv_contrib project and they are not there by default.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question