Skip to content

add_elements not adding elements using Interactive #362

@lguerard

Description

@lguerard

Hi,

I'm trying to use this package to show my sopa results but can't get my elements to be shown in napari through code.

Here is my code :

image_key = list(sdata.images.keys())[0]
points_key = list(sdata.points.keys())[0] 

interactive = Interactive(sdata, headless=True)
interactive.add_element(image_key, "global", True)
interactive.add_element(points_key, "global", True)
interactive.add_element("cellpose_boundaries", "global", True)
interactive.run()

This loads the image but then nothing else.
The notebook shows

INFO: Please wait for the current operation to finish.
INFO: Please wait for the current operation to finish.
2025-05-13 15:56:57.577 | DEBUG    | napari_spatialdata._view:_on_layer_update:569 - Updating layer.
2025-05-13 15:56:57.578 | DEBUG    | napari_spatialdata._view:_on_layer_update:569 - Updating layer.

but it never finishes. Clicking on it through the GUI is super fast though. Any ideas why ?

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