-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
read_csv fails to read file if there are cyrillic symbols in filename #17773
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
Comments
@c-fos : Thanks for reporting this! A couple of questions:
I'm trying to figure out if this is just a general Python issue of not handling Cyrillic characters well OR if this a |
|
Alright, this is indeed a |
The error is raised here: pandas/pandas/_libs/parsers.pyx Lines 709 to 718 in def3bce
The culprit function I believe is here: pandas/pandas/_libs/src/parser/io.c Lines 24 to 49 in def3bce
What worries me is that it might have to do with the |
File "pandas/_libs/parsers.pyx", line 384, in pandas._libs.parsers.TextReader.cinit |
I can not believe this. It's year 2019 now, pandas v 23.4 and this issue with Cyrillic paths and C engine is STILL NOT FIXED, even after so many issue reports and questions on stackoverflow. Open source community seems to be no better than Microsoft in this regard, where known bugs are not getting fixed for years. |
@fingoldo : Sorry about this! We do get a lot of issues every day, and unlike at Microsoft, we have way fewer code maintainers to work and address all of these issues that we receive. That being said, if you would like to tackle the issue, that would be great! Part of the issue that we have right now is that it's hard for us to test and validate any fixes, so a community contribution would be most welcome for something like this. xref #15086 (comment) |
@gfyoung sorry for the harsh words and thank you for your kind reply, I personally don't know how to fix that issue but please, if someone from devs who has actually created relevant modules sees this thread, roll out the fix, it's really embarassing to still have that error when engine is set to C... |
@fingoldo : Yeah, it's awkward no doubt, but I hope you understand that there are many of these types of "embarrassing errors" than there are man-hours (devs and contributors combined) to correct them, especially if people have a hard time reproducing them. Lucky for you, I currently have in my possession a Windows machine, and I was able to patch this issue pretty quickly in a PR: |
Amazing thank you so much!!! |
Code Sample, a copy-pastable example if possible
Problem description
The 'c' engine should read the files with non-UTF-8 filenames
Expected Output
File content readed into dataframe
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.6.1.final.0
python-bits: 32
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.20.3
pytest: None
pip: 9.0.1
setuptools: 28.8.0
Cython: None
numpy: 1.13.2
scipy: 0.19.1
xarray: None
IPython: 6.2.1
sphinx: None
patsy: None
dateutil: 2.6.1
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: 2.4.8
xlrd: None
xlwt: None
xlsxwriter: None
lxml: 4.0.0
bs4: None
html5lib: 1.0b10
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
pandas_gbq: None
pandas_datareader: None
None
The text was updated successfully, but these errors were encountered: