home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 326553877

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
326553877 MDU6SXNzdWUzMjY1NTM4Nzc= 2187 open_dataset crash with long filenames 16655388 closed 0     2 2018-05-25T14:47:31Z 2018-05-29T14:43:50Z 2018-05-29T14:42:35Z NONE      

Code Sample

```python 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

```

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()

# Paste the output here xr.show_versions() here 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
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2187/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 2 rows from issue in issue_comments
Powered by Datasette · Queries took 0.973ms · About: xarray-datasette