You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to #8006 but the opposite side of the coin: while one can save to_zarr, it is still not possible to give a pathlib.Path object to dask.array.from_zarr, although this is possible withzarr.open.
Yes, this seems to be because fsspec does not support Paths and from_zarr uses fsspec directly where to_zarr uses zarr.open. On the zarr side, someone passing fsspec mappers around shouldn't be using Paths, so it's probably best not to do this Path -> str conversion in zarr (which is where the fix for #8006 came from), but here as the fsspec mapper is an internal implementation detail it's probably fair to add another conditional like if isinstance(url, os.PathLike): url = os.fspath(url).
Activity
clbarnes commentedon Sep 22, 2021
Yes, this seems to be because fsspec does not support
Paths andfrom_zarruses fsspec directly whereto_zarruseszarr.open. On the zarr side, someone passing fsspec mappers around shouldn't be usingPaths, so it's probably best not to do thisPath->strconversion in zarr (which is where the fix for #8006 came from), but here as the fsspec mapper is an internal implementation detail it's probably fair to add another conditional likeif isinstance(url, os.PathLike): url = os.fspath(url).fix: support Path objects in from_zarr (#8168) (#8266)