Skip to content

Commit df44969

Browse files
committed
improve error message when xlrd import fails
1 parent 84fb0e0 commit df44969

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/io/parsers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2000,7 +2000,7 @@ def __init__(self, path_or_buf, kind=None, **kwds):
20002000
import xlrd # throw an ImportError if we need to
20012001
ver = tuple(map(int,xlrd.__VERSION__.split(".")[:2]))
20022002
if ver < (0, 9):
2003-
raise ImportError("pandas requires xlrd >= 0.9.0 for excel support")
2003+
raise ImportError("pandas requires xlrd >= 0.9.0 for excel support, current version "+xlrd.__VERSION__)
20042004

20052005
self.path_or_buf = path_or_buf
20062006
self.tmpfile = None

0 commit comments

Comments
 (0)