-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
pandas.read_excel 'Can't determine version for xlrd' - old bug on pandas-2.1 #56692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
edit: misread - |
Thanks for the report! It seems to me we should only be checking the xlrd version if we intend to use it. Also, I'm wondering if |
I could reproduce this issue for version 1.1.0 for xlrd @rhshadrach @brobr.The code will work for xlrd: 2.0.1. For the optional file, xlrd version is hardcoded and so whenever object tries to check the version for 1.1.0 in the optional file, it returns a None when we got to getattr(module, ""version"",None) and thus the code breaks. |
Yes - this is the minimum supported version. Any version older than 2.0.1 is not supported by pandas. Still, we shouldn't be checking an optional import that you are not trying to use.
This is not correct. |
I get it what's happening here @rhshadrach. I should have been a bit more robust with debugging earlier. The info.py file mentions version for 2.0.1 as __version__ = __VERSION__ = "2.0.1" We are retrieving the version using getattr(module, "__version__", None) and thus the code is breaking after this with import error. |
I ran into this bug on pandas-2.1
without xlrd present no problem; but when installed, excel file is not loaded:
Originally posted by @brobr in #39355 (comment)
The text was updated successfully, but these errors were encountered: