-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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: set errno in read_csv #13872
Comments
I suppose. checking |
this is already a pretty useful error |
Yes, the string error is fine. However, when you want to handle only the file does not exist error gracefully, and
|
its way more pythonic is to check for existence explicity then. as I said if you want to submit a patch, by all means. |
@jreback : I agree with what you're saying about this and that error number isn't necessary without more justification. Would vote to close unless more info can be provided. |
This appears to work on master now. I suppose it could use a test
|
The same is true for Pandas on Python 2.7 with except IOError and on Python 3.5 with OSError. The following is how to reproduce the bug on Python 3.5.
Pandas is not reporting any errno within the exceptions. As a result, there is no way to differentiate between File Not Found Error (ENOENT) and other types of OSErrors.
Code Sample
Current Output
(None, 2)
Expected Output
(2, 2)
output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.5.2.final.0
python-bits: 64
OS: Darwin
OS-release: 15.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.18.1
nose: 1.3.7
pip: 8.1.2
setuptools: 23.0.0
Cython: 0.24
numpy: 1.11.1
scipy: 0.17.1
statsmodels: 0.6.1
xarray: None
IPython: 4.2.0
sphinx: 1.4.1
patsy: 0.4.1
dateutil: 2.5.3
pytz: 2016.4
blosc: None
bottleneck: 1.1.0
tables: 3.2.2
numexpr: 2.6.0
matplotlib: 1.5.1
openpyxl: 2.3.2
xlrd: 1.0.0
xlwt: 1.1.2
xlsxwriter: 0.9.2
lxml: 3.6.0
bs4: 4.4.1
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.13
pymysql: None
psycopg2: None
jinja2: 2.8
boto: 2.40.0
pandas_datareader: None
The text was updated successfully, but these errors were encountered: