-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
ERR: in python >= 3.5 use FileNotFoundError instead of OSError #14086
Comments
FYI your syntax is non-python
sure, this could be enable for >= 3.5. would have to be compat for < 3.5 (continue to raise compat code should go in This change would also should be make across the entire io suite. E.g. |
Edited original comment to fix typo you pointed out. Switching between languages is a pain. I agree with you proposed solution. Thanks for the pointers! |
@brunobeltran hah, no problem. easy solution to switching. just always use python! lol |
@jreback : |
For a nonexistent file, raise the more specific FileNotFoundError for Python >= 3.3 in read_csv, read_table, and read_hdf. This error is backported to Python 2.x as IOError. Closes pandas-devgh-14086.
For a nonexistent file, raise the more specific FileNotFoundError for Python >= 3.3 in read_csv, read_table, and read_hdf. This error is backported to Python 2.x as IOError. Closes gh-14086.
Simple to reproduce:
Instead, I get an OSError, which tells me in text that
OSError: File b'this_file_does_not_exist.csv' does not exist
.https://docs.python.org/3.5/library/exceptions.html seems to suggest that OSError now has various subclasses, e.g. FileNotFoundError, for specific errors such as this one.
Output of
pd.show_versions()
:The text was updated successfully, but these errors were encountered: