home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 105649801

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
105649801 MDU6SXNzdWUxMDU2NDk4MDE= 565 Better error message for tutorial dataset not found 5356122 closed 0     1 2015-09-09T17:55:26Z 2019-01-15T21:20:53Z 2019-01-15T21:20:53Z MEMBER      

Here's what happens when you try to load a dataset that doesn't exist:

``` In [13]: a = xray.tutorial.load_dataset('air_temperatures')


RuntimeError Traceback (most recent call last) <ipython-input-13-c6a14087d2f5> in <module>() ----> 1 a = xray.tutorial.load_dataset('air_temperatures')

/Users/clark.fitzgerald/dev/xray/xray/tutorial.pyc in load_dataset(name, cache, cache_dir, github_url, kws) 53 _urlretrieve(url, localfile) 54 ---> 55 ds = _open_dataset(localfile, kws).load() 56 57 if not cache:

/Users/clark.fitzgerald/dev/xray/xray/backends/api.pyc in open_dataset(filename_or_obj, group, decode_cf, mask_and_scale, decode_times, concat_characters, decode_coords, engine, chunks, lock, drop_variables) 169 allow_remote=True) 170 if engine == 'netcdf4': --> 171 store = backends.NetCDF4DataStore(filename_or_obj, group=group) 172 elif engine == 'scipy': 173 store = backends.ScipyDataStore(filename_or_obj)

/Users/clark.fitzgerald/dev/xray/xray/backends/netCDF4_.pyc in init(self, filename, mode, format, group, writer, clobber, diskless, persist) 133 ds = nc4.Dataset(filename, mode=mode, clobber=clobber, 134 diskless=diskless, persist=persist, --> 135 format=format) 136 with close_on_error(ds): 137 self.ds = _nc4_group(ds, group, mode)

netCDF4/_netCDF4.pyx in netCDF4._netCDF4.Dataset.init (netCDF4/_netCDF4.c:9551)()

RuntimeError: NetCDF: Unknown file format

In [14]: a = xray.tutorial.load_dataset('air_temperature')

In [15]: ```

This could leave a bad first impression for someone trying the library. Better to see something like: IOerror: No such file. Try one of ['air_temperature', ...]

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/565/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
  • 1 row from issue in issue_comments
Powered by Datasette · Queries took 78.657ms · About: xarray-datasette