Snippets
Snippets copied to clipboard
tma_spot_dearray.py returns error
Hello,
Thanks for sharing your code. I have a question. When I am trying to run, I get the following error. It seems slide.properties['openslide.mpp-x'] is not available. What can be the reason? Anything related to the image type. I use a qupath tiff file.
Cheers,
args: Namespace(wsi_name='/Users/sium/projects/imagingdata/NS2_4a/Scan2/NS2_4a_Scan2.qptiff', txt_name='project/tmameasure.ns24a.txt', tmaspotsize=6000, outdir='output', level=0)
Extracting patches for /Users/sium/projects/imagingdata/NS2_4a/Scan2/NS2_4a_Scan2.qptiff into output
Downsample at level 0 is: 1.0
WSI dimensions at level 0 are: (38400, 54720).
Traceback (most recent call last):
File "/Users/sium/projects/dearray/tma_spot_dearray.py", line 44, in <module>
ratio_x = 1.0/float(slide.properties['openslide.mpp-x'])
File "/Users/sium/opt/miniconda3/envs/openslide/lib/python3.10/site-packages/openslide/__init__.py", line 257, in __getitem__
raise KeyError()
KeyError
ooops, sorry, only seeing this now. were you able to figure this out?