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 301888608,MDU6SXNzdWUzMDE4ODg2MDg=,1954,ds.to_zarr error on creation,9453271,closed,0,,,8,2018-03-02T20:05:32Z,2018-03-06T19:00:28Z,2018-03-06T19:00:28Z,CONTRIBUTOR,,,,"Creating just a sample dataset: ``` data = xr.DataArray(np.random.randn(2, 3), coords={'x': ['a', 'b']}, dims=('x', 'y')) ds_test = xr.Dataset({'foo': data, 'bar': ('x', [1, 2]), 'baz': np.pi}) print(ds_test) ds_test.to_zarr(store='foo.zarr', mode='w') ``` Writing this locally. This generates a .zgroup and .zattrs file, but then fails out with, AttributeError: 'Attributes' object has no attribute 'put'. Tried on a couple machines and I get the same error each time. Run on: MacOS 10.13.3 CentOS Linux release 7.4.1708 (Core) ``` --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) in () 11 ).chunk({'y': 50, 'x': 40}) 12 ---> 13 ds.to_zarr(store='/home/kyp/foo.zarr', mode='w') ~/.conda/envs/kai/lib/python3.6/site-packages/xarray/core/dataset.py in to_zarr(self, store, mode, synchronizer, group, encoding) 1165 from ..backends.api import to_zarr 1166 return to_zarr(self, store=store, mode=mode, synchronizer=synchronizer, -> 1167 group=group, encoding=encoding) 1168 1169 def __unicode__(self): ~/.conda/envs/kai/lib/python3.6/site-packages/xarray/backends/api.py in to_zarr(dataset, store, mode, synchronizer, group, encoding) 752 # I think zarr stores should always be sync'd immediately 753 # TODO: figure out how to properly handle unlimited_dims --> 754 dataset.dump_to_store(store, sync=True, encoding=encoding) 755 return store ~/.conda/envs/kai/lib/python3.6/site-packages/xarray/core/dataset.py in dump_to_store(self, store, encoder, sync, encoding, unlimited_dims) 1068 1069 store.store(variables, attrs, check_encoding, -> 1070 unlimited_dims=unlimited_dims) 1071 if sync: 1072 store.sync() ~/.conda/envs/kai/lib/python3.6/site-packages/xarray/backends/zarr.py in store(self, variables, attributes, *args, **kwargs) 378 def store(self, variables, attributes, *args, **kwargs): 379 AbstractWritableDataStore.store(self, variables, attributes, --> 380 *args, **kwargs) 381 382 ~/.conda/envs/kai/lib/python3.6/site-packages/xarray/backends/common.py in store(self, variables, attributes, check_encoding_set, unlimited_dims) 275 variables, attributes = self.encode(variables, attributes) 276 --> 277 self.set_attributes(attributes) 278 self.set_dimensions(variables, unlimited_dims=unlimited_dims) 279 self.set_variables(variables, check_encoding_set, ~/.conda/envs/kai/lib/python3.6/site-packages/xarray/backends/zarr.py in set_attributes(self, attributes) 341 342 def set_attributes(self, attributes): --> 343 self.ds.attrs.put(attributes) 344 345 def encode_variable(self, variable): AttributeError: 'Attributes' object has no attribute 'put' ``` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/1954/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue