Skip to content

Cannot create FSStore for unlistable http URLs #993

@rabernat

Description

@rabernat

Minimal, reproducible code sample, a copy-pastable example if possible

import zarr
import fsspec

# public
url = 'https://g-c70289.0da32.08cc.data.globus.org/pyqg_ensemble/001.zarr'

# this errors
store = zarr.storage.FSStore(url)

# because of this
fs = fsspec.implementations.http.HTTPFileSystem()
fs.isdir(url) # -> False

# however, there is consolidated metadata
data = fs.get_mapper(url)['.zmetadata']

Problem description

We often store Zarr on HTTP servers that don't support directory listing. This works because Zarr consolidated metadata tells us everything we need to know about the data available, so no listing is required.

However, Zarr won't let me create such a Store, as shown in the example above.

There needs to be a workaround to allow unlistable http stores with consolidated metadata.

Version and installation information

Please provide the following:

  • zarr 2.11.0
  • fsspec 2022.02.0

This came up in pangeo-forge/pangeo-forge-recipes#222

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions