Closed lvmt closed 4 months ago
hi,
nice tool.
I'm running the toturial "tangram with squidpy", the code error like
"tangram with squidpy"
img = sq.datasets.visium_fluo_image_crop() sq.im.process(img=img, layer="image", method="smooth") sq.im.segment( img=img, layer="image_smooth", method="watershed", channel=0, )
TypeError Traceback (most recent call last) Cell In[5], line 1 ----> 1 sq.im.segment( 2 img=img, 3 layer="image_smooth", 4 method="watershed", 5 channel=0, 6 )
File d:\software\miniconda3\envs\st38\lib\site-packages\squidpy\im_segment.py:340, in segment(img, layer, library_id, method, channel, chunks, lazy, layer_added, copy, **kwargs) 337 assert isinstance(method, SegmentationModel) 339 start = logg.info(f"Segmenting an image of shape {img[layer].shape} using {method}") --> 340 res: ImageContainer = method.segment( 341 img, 342 layer=layer, 343 channel=channel, 344 library_id=library_id, 345 chunks=None, 346 fn_kwargs=kwargs, 347 copy=True, 348 drop=copy, 349 lazy=lazy, 350 ) 351 logg.info("Finish", time=start) ... 236 ) 237 elif label.dtype.kind == "b": 238 indexer = label
{img[layer].shape}
{method}
TypeError: get_loc() got an unexpected keyword argument 'method'
squidpy 1.2.2 tangram-sc 1.0.4 scanpy 1.9.6
need your help and thanks.
hi @lvmt I would suggest you to update to latest squidpy and try again
thanks, problem solved .
hi,
nice tool.
I'm running the toturial
"tangram with squidpy"
, the code error likemy code
error message :
TypeError Traceback (most recent call last) Cell In[5], line 1 ----> 1 sq.im.segment( 2 img=img, 3 layer="image_smooth", 4 method="watershed", 5 channel=0, 6 )
File d:\software\miniconda3\envs\st38\lib\site-packages\squidpy\im_segment.py:340, in segment(img, layer, library_id, method, channel, chunks, lazy, layer_added, copy, **kwargs) 337 assert isinstance(method, SegmentationModel) 339 start = logg.info(f"Segmenting an image of shape
{img[layer].shape}
using{method}
") --> 340 res: ImageContainer = method.segment( 341 img, 342 layer=layer, 343 channel=channel, 344 library_id=library_id, 345 chunks=None, 346 fn_kwargs=kwargs, 347 copy=True, 348 drop=copy, 349 lazy=lazy, 350 ) 351 logg.info("Finish", time=start) ... 236 ) 237 elif label.dtype.kind == "b": 238 indexer = labelTypeError: get_loc() got an unexpected keyword argument 'method'
package:
squidpy 1.2.2 tangram-sc 1.0.4 scanpy 1.9.6
need your help and thanks.