issues: 270440308
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
270440308 | MDU6SXNzdWUyNzA0NDAzMDg= | 1681 | Serializing attrs | 2656596 | closed | 0 | 3 | 2017-11-01T20:24:48Z | 2017-11-12T07:02:41Z | 2017-11-12T07:02:41Z | NONE | I'm running Windows 10, Python 2.7, and xarray version 0.9.6 Using this dictionary for a Dataset attribute: ```python from xarray import Dataset crs = {u'ellps': u'GRS80', u'k': 0.9996, u'lat_0': 0, u'lon_0': 173, u'no_defs': True, u'proj': u'tmerc', u'units': u'm', u'x_0': 1600000, u'y_0': 10000000} ds = Dataset() ds.attrs['crs'] = crs ``` When attempting to serialize the dataset attribute, I get the
This used to work in previous versions. I then convert it to a list of tuples via crs.items(), and it successfully saves the netcdf. But when I then open the netcdf back up, the list of tuples become one long concatenated string. I'm guessing the core netcdf library has become more restrictive, but it would be nice to fully clarify what can be serialized or not. Thanks |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/1681/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |