Skip to content
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

xlsx is not supported by xlrd anymore #75

Open
longlevan opened this issue Jul 5, 2021 · 1 comment
Open

xlsx is not supported by xlrd anymore #75

longlevan opened this issue Jul 5, 2021 · 1 comment
Assignees

Comments

@longlevan
Copy link

oemof-solph: v0.4.x - excel_reader
OS: Windows 10
Python: 3.9.1

If engine is not specified for xls = pd.ExcelFile(filename) the following error occurs:

raise XLRDError(FILE_FORMAT_DESCRIPTIONS[file_format]+'; not supported')
xlrd.biffh.XLRDError: Excel xlsx file; not supported

This happens as excel file was created for the extension xlsx which is not supported anymore by xlrd. The problem will be solved by installing openpyxl and specifying it as engine for parsing xlsx using pandas xls = pd.ExcelFile(filename,engine='openpyxl').

Another error occurs when running dispatch.py is that when parsed data are NaN (i.e. np.nan), if de["active"] return true. For avoiding that np.nan should be removed or check to be sure de["active"] is not NaN: if de["active"] and (not pd.isnull(de["active"]))

@uvchik uvchik self-assigned this Jul 5, 2021
@uvchik uvchik added bug and removed bug labels Jul 5, 2021
@uvchik
Copy link
Member

uvchik commented Jul 5, 2021

Thank you for reporting. I will check it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants