Skip to content

Unify error messages when opening inexistent excel/csv file #29125

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

Open
nottatdat opened this issue Oct 21, 2019 · 2 comments
Open

Unify error messages when opening inexistent excel/csv file #29125

nottatdat opened this issue Oct 21, 2019 · 2 comments
Labels
API - Consistency Internal Consistency of API/Behavior Enhancement Error Reporting Incorrect or improved errors from pandas IO Data IO issues that don't fit into a more specific label

Comments

@nottatdat
Copy link

nottatdat commented Oct 21, 2019

Similar to #29102, excel and csv file extensions now have inconsistent errors for nonexistent files.

import pandas as pd
pd.read_csv('file_1.csv')
IOError: [Errno 2] File file_1.csv does not exist: 'file_1.csv'

pd.read_excel('file_2.xlsx')
IOError: [Errno 2] No such file or directory: 'file_2.xlsx'

Would be better to have a uniform error message across multiple file extensions, like the one with json in #29104:

FileNotFoundError: File 'no_file.json' does not exist
@nottatdat
Copy link
Author

I'm more than happy to contribute to this issue!

@nottatdat nottatdat changed the title Misleading error messages when opening inexistent excel/csv file Unify error messages when opening inexistent excel/csv file Oct 21, 2019
@mohitanand001
Copy link
Contributor

Hi @tataudat, I have already started to work on the issue, when I identified that in this comment #29104 (comment)

@jbrockmendel jbrockmendel added IO Data IO issues that don't fit into a more specific label Error Reporting Incorrect or improved errors from pandas labels Oct 21, 2019
@jbrockmendel jbrockmendel added the API - Consistency Internal Consistency of API/Behavior label Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API - Consistency Internal Consistency of API/Behavior Enhancement Error Reporting Incorrect or improved errors from pandas IO Data IO issues that don't fit into a more specific label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants