# Unable to save subset spatialdata to zarr

**URL:** <https://discourse.scverse.org/t/unable-to-save-subset-spatialdata-to-zarr/3995>\
**Category:** spatialdata\
**Created:** [May 21, 2026, 12:09pm UTC](https://discourse.scverse.org/t/unable-to-save-subset-spatialdata-to-zarr/3995 "2026-05-21T12:09:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![npont](https://avatars.discourse-cdn.com/v4/letter/n/838e76/32.png) [@npont](https://discourse.scverse.org/u/npont)\
**Post date:** [May 21, 2026, 12:09pm UTC](https://discourse.scverse.org/t/unable-to-save-subset-spatialdata-to-zarr/3995/1 "2026-05-21T12:09:22Z")

</div>

Hello,  
I have subset a spatialdata using coordinates of a selection. This generated properly a new spatialdata (call it test) containing a subset of the SpatialElements initially present in the whole sdata, as desired.  
When it comes to saving it to zarr, it does not work:  
`test.write(path_zarr+“Brain9_Female.zarr”, overwrite=True)`

The error is:

```auto
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

```

Any help would be appreciated. I would like to further load this new subset on Xenium Explorer, amongst other downstream analysis.

---

<div class="post-metadata">

**Author:** ![LucaMarconato](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/lucamarconato/32/661_2.png) [@LucaMarconato](https://discourse.scverse.org/u/LucaMarconato)\
**Post date:** [May 21, 2026, 1:34pm UTC](https://discourse.scverse.org/t/unable-to-save-subset-spatialdata-to-zarr/3995/2 "2026-05-21T13:34:31Z")

</div>

Hi @npont, thanks for reaching out. Please can you report this bug in `github` (discourse is more for general use cases advice, not bug report) and add a complete copy-pastable reproducible example on a test datasets (`from spatialdata.datasets import blobs`). Thank you for your help in reporting the bug.
