home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 264322686

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
264322686 MDExOlB1bGxSZXF1ZXN0MTQ1NzYxNDk3 1622 Improved netcdf4 error message when opening non existent file 2443309 closed 0     3 2017-10-10T18:03:16Z 2017-10-20T19:35:11Z 2017-10-20T19:35:11Z MEMBER   0 pydata/xarray/pulls/1622
  • [x] Tests added / passed
  • [x] Passes git diff upstream/master | flake8 --diff

This is particularly helpful when using open_mfdataset with a list of files. For example:

Current behavior (unclear which file is causing open_dataset to choke): ```Python-traceback In [2]: xr.open_mfdataset(['foo.nc', 'bar.nc'], engine='netcdf4')


OSError Traceback (most recent call last) <ipython-input-2-12b24f38f025> in <module>() ----> 1 xr.open_mfdataset(['foo.nc', 'bar.nc'], engine='netcdf4')

...

/Users/jhamman/Dropbox/src/xarray/xarray/backends/netCDF4_.py in _open_netcdf4_group(filename, mode, group, kwargs) 183 import netCDF4 as nc4 184 --> 185 ds = nc4.Dataset(filename, mode=mode, kwargs) 186 187 with close_on_error(ds):

netCDF4/_netCDF4.pyx in netCDF4._netCDF4.Dataset.init()

netCDF4/_netCDF4.pyx in netCDF4._netCDF4._ensure_nc_success()

OSError: No such file or directory ```

And the new behavior ```Python-traceback In [2]: xr.open_mfdataset(['foo.nc', 'bar.nc'], engine='netcdf4')

...

/Users/jhamman/Dropbox/src/xarray/xarray/backends/netCDF4_.py in _open_netcdf4_group(filename, mode, group, kwargs) 186 ds = nc4.Dataset(filename, mode=mode, kwargs) 187 except OSError as e: --> 188 raise OSError("Error opening %r" % filename, e) 189 190 with close_on_error(ds):

OSError: [Errno Error opening '/Users/jhamman/Dropbox/src/xarray/foo.nc'] No such file or directory

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1622/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 pull

Links from other tables

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