Monday, July 11, 2011

Python: AttributeError: 'module' object has no attribute

if you are getting the AttributeError: ' Module' object has no attribute do the following.

1. don't give the same name to your python script as that of library that you have imported.
python will import your script file instead of the orginal librarby file.
2. check the import file definition (if you are using a ide, just right click and say go to definiton )
to see if it has the attribute that you are trying to use . in simple , just do a ctrl-f and search the parameter that you are looking for.

No comments:

Post a Comment