代码:
df.to_hdf('F:\中文路径\hdf5_file.h5',key='file1',mode='w')
报错内容:
Traceback (most recent call last):
File "F:/代码/code.py", line 48, in
hdf5_data.to_hdf('F:\中文路径\hdf5_file.h5',key='file1',mode='w')
File "E:\python\lib\site-packages\pandas\core\generic.py", line 2606, in to_hdf
pytables.to_hdf(
File "E:\python\lib\site-packages\pandas\io\pytables.py", line 277, in to_hdf
with HDFStore(
File "E:\python\lib\site-packages\pandas\io\pytables.py", line 561, in init
self.open(mode=mode, **kwargs)
File "E:\python\lib\site-packages\pandas\io\pytables.py", line 710, in open
self._handle = tables.open_file(self._path, self._mode, **kwargs)
File "E:\python\lib\site-packages\tables\file.py", line 315, in open_file
return File(filename, mode, title, root_uep, filters, **kwargs)
File "E:\python\lib\site-packages\tables\file.py", line 778, in init
self._g_new(filename, mode, **params)
File "tables/hdf5extension.pyx", line 492, in tables.hdf5extension.File._g_new
tables.exceptions.HDF5ExtError: HDF5 error back trace
File "C:\ci\hdf5_1545244154871\work\src\H5F.c", line 444, in H5Fcreate
unable to create file
File "C:\ci\hdf5_1545244154871\work\src\H5Fint.c", line 1364, in H5F__create
unable to open file
File "C:\ci\hdf5_1545244154871\work\src\H5Fint.c", line 1557, in H5F_open
unable to open file: time = Thu Jul 15 14:38:30 2021
, name = 'F:\中文路径\hdf5_file.h5', tent_flags = 13
File "C:\ci\hdf5_1545244154871\work\src\H5FD.c", line 734, in H5FD_open
open failed
File "C:\ci\hdf5_1545244154871\work\src\H5FDsec2.c", line 346, in H5FD_sec2_open
unable to open file: name = 'F:\中文路径\hdf5_file.h5', errno = 2, error message = 'No such file or directory', flags = 13, o_flags = 302
End of HDF5 error back trace
Unable to open/create file 'F:\中文路径\hdf5_file.h5'