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
{{ message }}
Repository navigation
FsspecStore.from_mapper() fails with DefaultAzureCredential because AzureBlobFileSystem is not JSON serializable #4220
Opening an xarray dataset backed by an Azure Blob Storage FSMap created with
DefaultAzureCredential fails because FsspecStore.from_mapper() attempts to
serialize the filesystem using fs.to_json().
The embedded DefaultAzureCredential is not JSON serializable.
Steps to reproduce
# /// script# requires-python = ">=3.12"# dependencies = [# "zarr@git+https://github.com/zarr-developers/zarr-python.git@main",# ]# ///## This script automatically imports the development branch of zarr to check for issuesimportzarrfromfsspecimportfilesystemfromazure.identityimportDefaultAzureCredentialimportxarrayasxrfs=filesystem(
"az",
account_name="<account>",
credential=DefaultAzureCredential(),
)
mapper=fs.get_mapper("container/example.zarr")
xr.open_zarr(mapper)
# zarr.print_debug_info()
Additional output
Traceback
TypeError: Object of type DefaultAzureCredential is not JSON serializable
Activity
d-v-b commentedon Jul 30, 2026
thanks for the report, did this start breaking in the recent 3.3.0 release?
hginzel commentedon Jul 30, 2026
Sorry, don't know, no tested before.
fix: preserve non-JSON-serializable storage options in _make_async (z…