Skip to content

Unable to save SpatialData object to zarr #1135

Description

@npont

Hello,
Saving a spatialdata object to zarr file throws error.

Reproducible example with blobs() dataset:

from spatialdata.datasets import blobs
sdata_github = blobs()
sdata_github.write(path_zarr+"github_report_bug.zarr",overwrite=True)

Bug description:
It throws the error:

RuntimeError: `anndata.settings.allow_write_nullable_strings` is False, because writing of `pd.arrays.{StringArray,ArrowStringArray}` is new and not supported in anndata < 0.11, still use by many people. Opt-in to writing these arrays by toggling the setting to True.
Error raised while writing key '_index' of <class 'zarr.core.group.Group'> to /tables/table/obs

Session Info:

spatialdata_io version: 0.7.0
scanpy version: 1.11.2
pandas version: 3.0.2
numpy version: 2.3.5
anndata version: 0.12.16
spatialdata version: 0.7.3
spatialdata_plot version: 0.3.4

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