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

DOC: "engine=odf" option should ask you to install pyodf instead of odf in pandas.read_excel #35948

Closed
TrigonaMinima opened this issue Aug 28, 2020 · 5 comments · Fixed by #36134
Labels
Error Reporting Incorrect or improved errors from pandas good first issue IO Excel read_excel, to_excel
Milestone

Comments

@TrigonaMinima
Copy link

Location of the documentation

"pandas.read_excel"

Documentation problem

When engine="odf" is used and pyodf is not installed it gives an error that you should install optional dependency odf as pip or conda install odf. This pip/conda command fails because there's no module called odf. This could also be a security vulnerability if someone puts a malicious "odf" module on pypi.

Suggested fix for documentation

The error should ask you to install odf using pip or conda install pyodf

@TrigonaMinima TrigonaMinima added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Aug 28, 2020
@TrigonaMinima TrigonaMinima changed the title DOC: DOC: "engine=odf" option should ask you to install pyodf instead of odf in pandas.read_excel Aug 28, 2020
@TomAugspurger
Copy link
Contributor

TomAugspurger commented Sep 4, 2020

Do you mean odfpy rather than pyodf?

We'll need to update https://github.com/pandas-dev/pandas/blame/master/pandas/compat/_optional.py#L48-L50 to take an optional package name argument. Or we can have a dict of import names to package names and do something like

install_name = install_mapping.get(name, name)

and include the install name in the error message.

@TomAugspurger TomAugspurger added this to the Contributions Welcome milestone Sep 4, 2020
@TomAugspurger TomAugspurger added Error Reporting Incorrect or improved errors from pandas good first issue IO Excel read_excel, to_excel and removed Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 4, 2020
@hs2361
Copy link
Contributor

hs2361 commented Sep 4, 2020

Hello, I am new to the community, and I would like to work on this issue. May I take this issue?

@hs2361
Copy link
Contributor

hs2361 commented Sep 4, 2020

Please review my changes made in the commit.

@arw2019
Copy link
Member

arw2019 commented Sep 4, 2020

@hs2361 can you open a pull request and link to this issue

@hs2361
Copy link
Contributor

hs2361 commented Sep 5, 2020

I have opened a pull request. Please review my code, and please notify me of changes to be made.

@jreback jreback modified the milestones: Contributions Welcome, 1.2, 1.1.2 Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas good first issue IO Excel read_excel, to_excel
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants