quentinblampey / spatialdata_xenium_explorer

Interoperability between SpatialData and the Xenium Explorer
https://quentinblampey.github.io/spatialdata_xenium_explorer/
BSD 3-Clause "New" or "Revised" License
15 stars 0 forks source link

Cannot import package[Bug] #6

Open chiwwong opened 5 months ago

chiwwong commented 5 months ago

Description

The package cannot be imported

Reproducing the issue

I ran the following codes according to he tutorial:

from spatialdata_io.readers.xenium import xenium_aligned_image
from pathlib import Path

Expected behavior

I saw the following error:


ImportError Traceback (most recent call last) Cell In[6], line 1 ----> 1 from spatialdata_io.readers.xenium import xenium_aligned_image 2 from pathlib import Path

File /miniconda3/envs/xenium-publication-env/lib/python3.10/site-packages/spatialdata_io/readers/xenium.py:32 30 from spatial_image import SpatialImage 31 from spatialdata import SpatialData ---> 32 from spatialdata._core.query.relational_query import _get_unique_label_values_as_index 33 from spatialdata._types import ArrayLike 34 from spatialdata.models import ( 35 Image2DModel, 36 Labels2DModel, (...) 39 TableModel, 40 )

ImportError: cannot import name '_get_unique_label_values_as_index' from 'spatialdata._core.query.relational_query' (/miniconda3/envs/xenium-publication-env/lib/python3.10/site-packages/spatialdata/_core/query/relational_query.py)

System

quentinblampey commented 5 months ago

Hello @chiwwong,

Thanks for reporting this issue! I released a new version where this should be fixed. Can you try to upgrade to spatialdata_xenium_explorer==0.1.7 and spatialdata-io>=0.1.2?

Some important changes in spatialdata caused these issues, but now spatialdata is stable and will always be retro-compatible. Therefore, spatialdata_xenium_explorer should also soon be stable. I'll also probably update/improve the tutorial and add it to the Sopa tutorials.