-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
read_hdf() file name encoding with with accented or special characters on Windows #29832
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
Can you provide a reproducible example, with a stacktrace? http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports |
Sorry for the late reply. Sure I can provide an example. Here is the code: import pandas as pd Here is the results of running the above code: Traceback (most recent call last): File "C:\ci\hdf5_1545244154871\work\src\H5F.c", line 444, in H5Fcreate End of HDF5 error back trace Unable to open/create file '测试.h5' I am using Windows 10 Chinese version. If I change the Windows system encoding to utf-8 (by running chcp 65001 in cmd.exe), the above code works fine. I suppose it resembles the already solved issue #15086 because I could also not use pd.read_csv before unless I change the Windows system encoding to utf-8. Now #15086 is solved and pd.read_csv works fine under my Windows default encoding. But hdf-related APIs still remain problematic. |
By the way, changing the system encoding to utf-8 is of course a solution to this issue. However, it affects using some other legacy software in, for example, Chinese, which does not support utf-8 encoding. So I hope this issue could be investigated. Thanks! |
Problem description
pd.read_hdf() has the same issue as #15086. If the file path contains special characters (like Chinese) on Windows, it fails to read the file.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.7.5.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 0.25.3
numpy : 1.17.3
pytz : 2019.3
dateutil : 2.8.1
pip : 19.3.1
setuptools : 41.6.0.post20191030
Cython : 0.29.14
pytest : 5.2.4
hypothesis : None
sphinx : 2.2.1
blosc : None
feather : None
xlsxwriter : 1.2.6
lxml.etree : 4.4.1
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.10.3
IPython : 7.9.0
pandas_datareader: None
bs4 : 4.8.1
bottleneck : 1.3.1
fastparquet : None
gcsfs : None
lxml.etree : 4.4.1
matplotlib : 3.1.1
numexpr : 2.7.0
odfpy : None
openpyxl : 3.0.1
pandas_gbq : None
pyarrow : None
pytables : None
s3fs : None
scipy : 1.3.1
sqlalchemy : 1.3.11
tables : 3.6.1
xarray : None
xlrd : 1.2.0
xlwt : 1.3.0
xlsxwriter : 1.2.6
The text was updated successfully, but these errors were encountered: