[Tutor] xlrd has no attribute

Alan Gauld alan.gauld at yahoo.co.uk
Thu Jan 11 19:22:25 EST 2018


On 11/01/18 22:52, Roger Lea Scherer wrote:

> Traceback (most recent call last):
>   File "C:\Users\Roger\Documents\Roger\Python\xlrd.py", line 1, in <module>
>     import xlrd

Look closely at the error message.
What is the name of the file that causes the error?
What is the name of the module you are importing?

You are masking the xlrd module with your xlrd.py file
and so import your own file.

Your file does not have the method so you get an error.

Don't name your applications after the modules you are using.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list