We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import xarray as xr import shutil import numpy as np # create netcdf file data = np.random.rand(4, 3) foo = xr.DataArray(data) foo.to_netcdf('test.nc') f_nc = 'a.nc' shutil.copy('test.nc', f_nc) while 1: print '{:05n} characteres'.format(len(f_nc)) ds1 = xr.open_dataset(f_nc) ds1.close() nf_nc = 'a' + f_nc shutil.move(f_nc, nf_nc) f_nc = nf_nc if len(f_nc) == 100: break
On my linux machine (CentOS) this code crashes (memory corrruption) when the filename length hits 32 characters.
On my OSX machine it is fine until 255 character and stops with an IOError
xr.show_versions()
commit: None python: 2.7.11.final.0 python-bits: 64 OS: Linux OS-release: 3.10.0-514.2.2.el7.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_CA.UTF-8 LOCALE: None.None
xarray: 0.10.4 pandas: 0.22.0 numpy: 1.14.2 scipy: 0.16.1 netCDF4: 1.2.2 h5netcdf: None h5py: 2.5.0 Nio: None zarr: None bottleneck: None cyordereddict: None dask: 0.17.2 distributed: None matplotlib: 1.5.0 cartopy: 0.13.1 seaborn: 0.8.1 setuptools: 19.2 pip: 10.0.1 conda: None pytest: None IPython: 4.0.1 sphinx: 1.7.2
The text was updated successfully, but these errors were encountered:
Try updating netCDF4-python to a newer version if possible.
This looks similar to a previously reported issue when using old versions of netCDF4-Python with 88 character filenames in #1745
Sorry, something went wrong.
Hi @shoyer
updating netCDF4 to 1.4.0 works. I now obtain a proper IOError message. Help appreciated. Thanks.
I intent to close the issue, hope it's proper "etiquette".
No branches or pull requests
Code Sample
Problem description
On my linux machine (CentOS) this code crashes (memory corrruption) when the filename length hits 32 characters.
On my OSX machine it is fine until 255 character and stops with an IOError
Output of
xr.show_versions()
INSTALLED VERSIONS
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Linux
OS-release: 3.10.0-514.2.2.el7.x86_64
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_CA.UTF-8
LOCALE: None.None
xarray: 0.10.4
pandas: 0.22.0
numpy: 1.14.2
scipy: 0.16.1
netCDF4: 1.2.2
h5netcdf: None
h5py: 2.5.0
Nio: None
zarr: None
bottleneck: None
cyordereddict: None
dask: 0.17.2
distributed: None
matplotlib: 1.5.0
cartopy: 0.13.1
seaborn: 0.8.1
setuptools: 19.2
pip: 10.0.1
conda: None
pytest: None
IPython: 4.0.1
sphinx: 1.7.2
The text was updated successfully, but these errors were encountered: