Skip to content Skip to sidebar Skip to footer

Error With Xlrd And Open_woorkbook

I´m starting programming with python and I keep receiving the same error in this program: import xlrd import numpy as np import matplotlib as plt file_location = ' X:\ \blabla.xl

Solution 1:

I had the same problem when I named a test python file as xlrd.py which is the same name as the module. I changed the name of my file and it worked.

Solution 2:

I had the same problem, which was, as I figured out, due to the linux permissions. Running pip3 as root, the installer made the contents of the package only visible for the root user. Strangely, the command

import xlrd

did not report any error, just nothing has been imported. The shell commands

sudo chmod -R go+r /usr/local/lib
sudo find /usr/local/lib -type d -execdir chmod go+x {} +

solved the issue.

Solution 3:

AttributeError: module 'xlrd' has no attribute 'open_workbook'

It means that open_workbook was not recognized as a method (i. e. a function) - what you wanted - but as an attribute (i. e. an variable).

Methods have opening parenthesis ( after them while attributes don't.

So something is bad - your real code is probably different from the code in your question, because in your question you have( after the name open_workbook.

Post a Comment for "Error With Xlrd And Open_woorkbook"