home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 424916834

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
424916834 MDExOlB1bGxSZXF1ZXN0MjY0MTMxNTU3 2850 More informative error when writing attrs to netCDF 10050469 closed 0     8 2019-03-25T13:58:30Z 2022-05-03T16:16:21Z 2022-05-03T16:16:21Z MEMBER   0 pydata/xarray/pulls/2850

Closes #3080

Some attribute names aren't valid netCDF4 keys. For example:

python import xarray as xr ds = xr.Dataset({'x': ('y', [1, 2, 3], {'CLASS': 'foo'})}) ds.to_netcdf('test.nc')

will fail with:

NetCDF: String match to name in use

This is hard to debug if you don't know which attribute is faulty. With this small change the error should be more informative:

AttributeError: The following exception occurred when attempting to set attribute (CLASS, foo): "NetCDF: String match to name in use"

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2850/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

  • 1 row from issues_id in issues_labels
  • 8 rows from issue in issue_comments
Powered by Datasette · Queries took 157.245ms · About: xarray-datasette