html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/2149#issuecomment-390037392,https://api.github.com/repos/pydata/xarray/issues/2149,390037392,MDEyOklzc3VlQ29tbWVudDM5MDAzNzM5Mg==,1217238,2018-05-17T22:47:48Z,2018-05-17T22:47:48Z,MEMBER,"I just got off an airplane (without internet), but I'll try to look into this shortly.
I guess I shouldn't be surprised that https://github.com/pydata/xarray/commit/3c8935e537e6ec05a83dbe372bfe45d88308d665 was the source of this bug -- it was pretty big refactor :(.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,324040111
https://github.com/pydata/xarray/issues/2149#issuecomment-389954770,https://api.github.com/repos/pydata/xarray/issues/2149,389954770,MDEyOklzc3VlQ29tbWVudDM4OTk1NDc3MA==,6213168,2018-05-17T17:57:07Z,2018-05-17T17:57:07Z,MEMBER,@shoyer I'm struggling to understand your change - help would be appreciated.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,324040111
https://github.com/pydata/xarray/issues/2149#issuecomment-389947329,https://api.github.com/repos/pydata/xarray/issues/2149,389947329,MDEyOklzc3VlQ29tbWVudDM4OTk0NzMyOQ==,6213168,2018-05-17T17:33:06Z,2018-05-17T17:33:37Z,MEMBER,"@shoyer found the culprit: https://github.com/pydata/xarray/commit/3c8935e537e6ec05a83dbe372bfe45d88308d665
Still need to understand why if you set the encoding directly on the variable it works though.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,324040111
https://github.com/pydata/xarray/issues/2149#issuecomment-389885258,https://api.github.com/repos/pydata/xarray/issues/2149,389885258,MDEyOklzc3VlQ29tbWVudDM4OTg4NTI1OA==,6213168,2018-05-17T14:25:24Z,2018-05-17T14:25:24Z,MEMBER,"1. this is limited to dtype=S1. There's auto tests implemented for dtype=f4 and dtype=int16 (https://github.com/pydata/xarray/blob/master/xarray/tests/test_backends.py#L729-L756), and those work fine.
```
ds = xarray.Dataset({'x': [1, 2]})
ds.to_netcdf('test.nc', encoding={'x': {'dtype': 'f4'}})
```
2. the bug can be worked around by setting the dtype on the variable directly - for which there is an automated test specific for S1 (https://github.com/pydata/xarray/blob/master/xarray/tests/test_backends.py#L333-L343):
```
ds = xarray.Dataset({'x': ['foo', 'bar', 'baz']})
ds['x'].encoding['dtype'] = 'S1'
ds.to_netcdf('test.nc')
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,324040111
https://github.com/pydata/xarray/issues/2149#issuecomment-389884190,https://api.github.com/repos/pydata/xarray/issues/2149,389884190,MDEyOklzc3VlQ29tbWVudDM4OTg4NDE5MA==,1217238,2018-05-17T14:22:24Z,2018-05-17T14:22:24Z,MEMBER,"Yes, this would warrant an immediate bug fix release.
On Thu, May 17, 2018 at 7:09 AM crusaderky wrote:
> In xarray 0.10.4, the dtype encoding in to_netcdf has stopped working, *for
> all engines*:
>
> >>> import xarray
> >>> ds = xarray.Dataset({'x': ['foo', 'bar', 'baz']})
> >>> ds.to_netcdf('test.nc', encoding={'x': {'dtype': 'S1'}})
> [...]
>
> xarray/backends/netCDF4_.py in _extract_nc4_variable_encoding(variable, raise_on_invalid, lsd_okay, h5py_okay, backend, unlimited_dims)
> 196 if invalid:
> 197 raise ValueError('unexpected encoding parameters for %r backend: '
> --> 198 ' %r' % (backend, invalid))
> 199 else:
> 200 for k in list(encoding):
>
> ValueError: unexpected encoding parameters for 'netCDF4' backend: ['dtype']
>
> I'm still trying to figure out how the regression tests didn't pick it up
> and what change introduced it.
>
> @shoyer I'm working on this as my top
> priority. Do you agree this is serious enough for an emergency re-release?
> (0.10.4.1 or 0.10.5, your choice)
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> , or mute the thread
>
> .
>
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,324040111