Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] #17

Open
nauyan opened this issue Jun 19, 2020 · 0 comments
Open

[BUG] #17

nauyan opened this issue Jun 19, 2020 · 0 comments

Comments

@nauyan
Copy link

nauyan commented Jun 19, 2020

Describe the bug
I have tried to run the code snippet in the Readme.MD file and I am getting a few errors. The WSIs is from the Panda Challenge hosted on Kaggle.

Code snippet or Error Message
The code that I have used:

slide = Slide(slide_path=dataset[0])

pipeline = Pipeline([OtsuTissueMask(), SimpleTiling(magnification=40,
                                                  tile_size=224,
                                                  max_per_class=10)])
slide = pipeline.fit_transform(slide)
visualize_pipeline_results(slide=slide,
                           transformer_list=pipeline.transformers,
                           title_list=['Tissue Mask', 'Random Tile Sampling'])

The error I have got is:

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
/opt/conda/lib/python3.6/site-packages/syntax/slide/slide.py in __init__(self, slide_path, level0, verbose)
     44             try:
---> 45                 self.level0 = float(self.properties['openslide.objective-power'])
     46                 if self.verbose:

/opt/conda/lib/python3.6/site-packages/openslide/__init__.py in __getitem__(self, key)
    250         if v is None:
--> 251             raise KeyError()
    252         return v

KeyError: 

During handling of the above exception, another exception occurred:

Exception                                 Traceback (most recent call last)
<ipython-input-7-d399eadbf4ad> in <module>
      4 from syntax.transformers import Pipeline, visualize_pipeline_results
      5 
----> 6 slide = Slide(slide_path=dataset[0])
      7 
      8 pipeline = Pipeline([OtsuTissueMask(), SimpleTiling(magnification=40,

/opt/conda/lib/python3.6/site-packages/typeguard/__init__.py in wrapper(*args, **kwargs)
    838         memo = _CallMemo(python_func, _localns, args=args, kwargs=kwargs)
    839         check_argument_types(memo)
--> 840         retval = func(*args, **kwargs)
    841         check_return_type(retval, memo)
    842 

/opt/conda/lib/python3.6/site-packages/syntax/slide/slide.py in __init__(self, slide_path, level0, verbose)
     47                     print('Level 0 found @ {}X'.format(self.level0))
     48             except:
---> 49                 raise Exception('Slide does not have property objective-power.')
     50         else:
     51             self.level0 = float(level0)

Exception: Slide does not have property objective-power.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant