Skip to content

Support Path objects in from_zarr #8168

Closed

Description

@jamestwebber

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.

Activity

  1. clbarnes commented on Sep 22, 2021

    @clbarnes

    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).

  2. added
    good first issue
    on Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    arraygood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions