issues: 322445312
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
322445312 | MDU6SXNzdWUzMjI0NDUzMTI= | 2121 | rasterio backend should use DataStorePickleMixin (or something similar) | 2443309 | closed | 0 | 2 | 2018-05-11T21:51:59Z | 2018-06-07T18:02:56Z | 2018-06-07T18:02:56Z | MEMBER | Code Sample, a copy-pastable example if possible```Python In [1]: import xarray as xr In [2]: ds = xr.open_rasterio('RGB.byte.tif') In [3]: ds Out[3]: <xarray.DataArray (band: 3, y: 718, x: 791)> [1703814 values with dtype=uint8] Coordinates: * band (band) int64 1 2 3 * y (y) float64 2.827e+06 2.826e+06 2.826e+06 2.826e+06 2.826e+06 ... * x (x) float64 1.021e+05 1.024e+05 1.027e+05 1.03e+05 1.033e+05 ... Attributes: transform: (101985.0, 300.0379266750948, 0.0, 2826915.0, 0.0, -300.0417... crs: +init=epsg:32618 res: (300.0379266750948, 300.041782729805) is_tiled: 0 nodatavals: (0.0, 0.0, 0.0) In [4]: import pickle In [5]: pickle.dumps(ds)TypeError Traceback (most recent call last) <ipython-input-5-a165c2473431> in <module>() ----> 1 pickle.dumps(ds) TypeError: can't pickle rasterio._io.RasterReader objects ``` Problem descriptionOriginally reported by @rsignell-usgs in https://github.com/pangeo-data/pangeo/issues/249#issuecomment-388445370, the rasterio backend is not pickle-able. This obviously causes problems when using dask-distributed. We probably need to use Expected Output
returns a pickled dataset. Output of
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/2121/reactions", "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |