Skip to content

Error in render_points: cannot reindex on an axis with duplicate labels #545

Closed

Description

@enric-bazz

Calling sdata.pl.render_points("transcripts").pl.show() on a SpatialData object containing Xenium data raises:

ValueError: cannot reindex on an axis with duplicate labels

Observation:
I noticed that the points element index of the SpatialData object is not unique. More generally, when reading the transcripts.parquet file into a Dask DataFrame (Dask 2026.1.1), the resulting index is not globally unique. Instead, indices appear to be enumerated independently within partitions, leading to duplicate labels across the full dataframe.

This may be related to the error above, although I am not certain that this is the index involved in the failing reindex operation.

Activity

  1. LucaMarconato commented on Mar 10, 2026

    @LucaMarconato
    Member

    CC @melonora in case he has some insights to share.

  2. enric-bazz commented on Mar 13, 2026

    @enric-bazz
    Author

    After further checks, the error appears to originate from spatialdata rather than spatialdata-plot.

    The behavior is related to the previously reported issue scverse/spatialdata#1064 and occurs after the fix introduced in scverse/spatialdata#1077.

  3. enric-bazz commented on Mar 17, 2026

    @enric-bazz
    Author

    I opened an issue reporting the root cause of this error on the spatialdata repository.

  4. timtreis commented on Mar 19, 2026

    @timtreis
    Member

    Thank you for the triage @enric-bazz !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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