Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError in rule patchify_cellpose: add_image(), add_labels(), add_points() and add_shapes() #43

Closed
suhridbuddha opened this issue Mar 29, 2024 · 6 comments

Comments

@suhridbuddha
Copy link

I am getting in this error at patchify stage:

RuntimeError: The functions add_image(), add_labels(), add_points() and
add_shapes() have been removed in favor of dict-like access to the elements.
Please use the following syntax to add an element:

    sdata.images["image_name"] = image
    sdata.labels["labels_name"] = labels
    ...

The new syntax does not automatically updates the disk storage, so you need to
call sdata.write() when the in-memory object is ready to be saved.
To save only a new specific element to an existing Zarr storage please use the
functions write_image(), write_labels(), write_points(), write_shapes() and
write_table(). We are going to make these calls more ergonomic in a follow up
PR.

any idea?

i am using snakemake-lsf profile (default setup) and xenium ome.tif

@quentinblampey
Copy link
Collaborator

Hello,

Yes, this is an issue related to the new version of Sopa (it solved a bug, but also created another one...).
Sorry for this second issue, I'll fix this on Wednesday!

@suhridbuddha
Copy link
Author

suhridbuddha commented Mar 29, 2024

Hello @quentinblampey thank you. the sopa i have now is Version: 1.0.6. Do you think downgrade may help?

Update: Another project of ours with the same xenium data and same sopa version is working fine on the same server. Do you think there are some lib dependencies as well?

@suhridbuddha
Copy link
Author

even with the tuto.zarr i am getting the same error now.

@quentinblampey
Copy link
Collaborator

quentinblampey commented Apr 2, 2024

Hello @suhridbuddha, the newest releases of spatialdata and spatialdata-io introduced some breaking changes, so I need to update Sopa (I know that everything is broken right now, sorry for that). This will be done tonight or tomorrow morning.

These changes came with the publication of SpatialData, but now there shouldn't have breaking changes anymore! Wait for the next Sopa release and it should be all fixed 😊

@quentinblampey
Copy link
Collaborator

quentinblampey commented Apr 2, 2024

Hello @suhridbuddha, I released sopa==1.0.9, can you try?
It should now work, even though I still need to check some new functionalities from spatialdata, and perform additional checks.

NB: spatialdata is now using multiple tables, but the old sdata.table syntax is still supported

@suhridbuddha
Copy link
Author

Thank you @quentinblampey. The new sopa has resolved the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants