Skip to content

Examples datasets from documentation don't open in current version of library #1033

@xinaesthete

Description

@xinaesthete

Describe the bug
There may be multiple underlying issues - and I haven't searched extensively to established where these might already be tracked.

However, I believe that the example datasets listed at https://spatialdata.scverse.org/en/stable/tutorials/notebooks/datasets/README.html should ideally be expected to open in a current version of the package - in my testing, it appears that none do in the current 0.6.1 release, so this is an issue in-and-of itself.

To Reproduce
Steps to reproduce the behavior:

Copy the URL of any of the "work with data remotely" links and open them in python:

import spatialdata as sd
sdata = sd.read_zarr('https://s3.embl.de/spatialdata/spatialdata-sandbox/visium_hd_3.0.0_io.zarr/')

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/ptodd/code/www/SpatialData.ts/python/v0.6.1/.venv/lib/python3.12/site-packages/spatialdata/_io/io_zarr.py", line 155, in read_zarr
    resolved_store = _resolve_zarr_store(store)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ptodd/code/www/SpatialData.ts/python/v0.6.1/.venv/lib/python3.12/site-packages/spatialdata/_io/_utils.py", line 463, in _resolve_zarr_store
    if isinstance(path, zarr.storage.StoreLike):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: isinstance() argument 2 cannot be a parameterized generic

I think not all of the datasets produce the same error. When loaded in an older version, a few different errors were raised, but in the current version, all of those datasets appear to produce precisely the same error.

Expected behavior
sdata to be a SpatialData object!

Desktop (optional):

  • OS: MacOS 15.6.1
  • Python: 3.12
  • Python environment: uv

Additional context

I noticed this while working on Taylor-CCB-Group/SpatialData.js#15 - and there exist in that branch scripts for more systematically testing this and generating reports on the results. Hopefully those should be relatively easy for others to run if that helps.

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