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/pull/5879#issuecomment-1085091126,https://api.github.com/repos/pydata/xarray/issues/5879,1085091126,IC_kwDOAMm_X85ArS02,6042212,2022-03-31T20:45:54Z,2022-03-31T20:45:54Z,CONTRIBUTOR,"OK, I get you - so the real problem is that OpenFile can look path-like, but isn't really.
OpenFile is really a file-like factory, a proxy for open file-likes that you can make (and seialise for Dask). Its main purpose is to be used in a context:
```python
with fsspec.open(url) as f:
ds = xr.open_dataset(f, engine=""h5netcdf"")
```
except that the problem with xarray is that it will want to keep this thing open for subsequent operations, so you either need to put all that in the context, or use `.open()/.close()` as you have been.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1031275532
https://github.com/pydata/xarray/pull/5879#issuecomment-1085037801,https://api.github.com/repos/pydata/xarray/issues/5879,1085037801,IC_kwDOAMm_X85ArFzp,6042212,2022-03-31T19:54:26Z,2022-03-31T19:54:26Z,CONTRIBUTOR,"""s3://noaa-nwm-retrospective-2-1-zarr-pds/lakeout.zarr"" is a directory, right? You cannot open that as a file, or maybe there is no equivalent key at all (because s3 is magic like that).
No, you should not be able to do this directly - zarr requires a path which fsspec can turn into a *mapper*, or an instantiated mapper.
To make a bare mapper (i.e., dict-like):
```
m = fsspec.get_mapper(""s3://noaa-nwm-retrospective-2-1-zarr-pds/lakeout.zarr"", ...)
```
or you could use zarr's FSMapper meant specifically for this job.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1031275532
https://github.com/pydata/xarray/pull/5879#issuecomment-1085022939,https://api.github.com/repos/pydata/xarray/issues/5879,1085022939,IC_kwDOAMm_X85ArCLb,6042212,2022-03-31T19:37:49Z,2022-03-31T19:37:49Z,CONTRIBUTOR,"`isinstance(X, os.PathLike)` is very like `hasattr(X, __fspath__)` because of:
```python
@classmethod
def __subclasshook__(cls, subclass):
if cls is PathLike:
return _check_methods(subclass, '__fspath__')
return NotImplemented
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1031275532