Filtering does not work if an extra table is present not related to an element (which is a use case to save analysis results).
# napari_spatialdata/utils/_utils.py:361
for element_type, element_name, _ in sdata.filter_by_coordinate_system(coordinate_system_name)._gen_elements()
which calls:
# spatialdata/_core/spatialdata.py:737
table = _filter_table_by_element_names(table, element_names) # table is None and has no len
if len(table) != 0:
# TypeError: object of type 'NoneType' has no len()
To reproduce:
import spatialdata as sd
import anndata as ad
from spatialdata.datasets import blobs
sdata = blobs()
sdata.tables['table2'] = sd.models.TableModel.parse(ad.AnnData((10, 10)))
sdata.write('test.zarr')
# Open in napari-spatialdata, click on coordinate-system global, get error
Filtering does not work if an extra table is present not related to an element (which is a use case to save analysis results).
which calls:
To reproduce: