Skip to content

Zarr over https returns an empty string in keys() #3575

@b8raoult

Description

@b8raoult

Zarr version

3.1.3

Numcodecs version

0.15.1

Python Version

3.12.9

Operating System

Mac

Installation

uv pip install zarr

Description

The following code:

import zarr, numcodecs

z = zarr.open('https://data.ecmwf.int/anemoi-datasets/era5-o96-1979-2023-6h-v8.zarr', mode='r')
print(list(z.keys()))

will show that one of the keys is the empty string ''. This is likely because the directory listing links to itself.

See https://data.ecmwf.int/anemoi-datasets/era5-o96-1979-2023-6h-v8.zarr

Steps to reproduce

# /// script
# requires-python = ">=3.11"
# dependencies = [
#   "zarr@git+https://github.com/zarr-developers/zarr-python.git@main",
# ]
# ///
#
# This script automatically imports the development branch of zarr to check for issues

import zarr
# your reproducer code
# zarr.print_debug_info()

Additional output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPotential issues with the zarr-python library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions