spatialdata-io icon indicating copy to clipboard operation
spatialdata-io copied to clipboard

TypeError: SpatialData.__init__() got an unexpected keyword argument 'table'

Open shutcm-wangxu opened this issue 3 weeks ago • 3 comments

---Hello, I am currently encountering the following issue: a problem with reading Cosmx. It was installed through the following method:
conda create -n spatial-data python=3.11 # python >= 3.11
pip install git+https://github.com/scverse/spatialdata-io.git@main
pip install git+https://github.com/scverse/spatialdata-plot.git@main
conda install ipykernel --yes----


sdata = cosmx(path="../data/CosMx/Lung5_Rep1/Lung5_Rep1-Flat_files_and_images/", dataset_id="Lung5_Rep1") TypeError Traceback (most recent call last) Cell In[9], line 1 ----> 1 sdata = cosmx(path="../data/CosMx/Lung5_Rep1/Lung5_Rep1-Flat_files_and_images/", dataset_id="Lung5_Rep1")

File ~/miniconda3/envs/spatial-data/lib/python3.11/site-packages/spatialdata_io/readers/cosmx.py:294, in cosmx(path, dataset_id, transcripts, imread_kwargs, image_models_kwargs) 272 points[f"{fov}_points"] = PointsModel.parse( 273 sub_table, 274 coordinates={"x": CosmxKeys.X_LOCAL_TRANSCRIPT, "y": CosmxKeys.Y_LOCAL_TRANSCRIPT}, (...) 281 }, 282 ) 284 # TODO: what to do with fov file? 285 # if fov_file is not None: 286 # fov_positions = pd.read_csv(path / fov_file, header=0, index_col=CosmxKeys.FOV) (...) 291 # logg.warning(f"FOV {str(fov)} does not exist, skipping it.") 292 # continue --> 294 return SpatialData(images=images, labels=labels, points=points, table=table)

TypeError: SpatialData.init() got an unexpected keyword argument 'table'

shutcm-wangxu avatar Nov 09 '25 12:11 shutcm-wangxu