SBU-BMI / SlicerPathology

3D Slicer extension for Pathology segmentation tools
http://bmi.stonybrookmedicine.edu
Other
5 stars 8 forks source link

Bug: the extension doesn't show up in 3DSlicer drop down menu #101

Closed mingrui closed 6 years ago

mingrui commented 6 years ago

3D Slicer 4.8.1

Number of registered modules: 144 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/mingrui/.config/NA-MIC/Extensions-26813/SlicerPathology/lib/Slicer-4.8/qt-scripted-modules/SlicerPathology.py", line 749, in <module>
    red_logic = slicer.app.layoutManager().sliceWidget("Red").sliceLogic()
AttributeError: 'NoneType' object has no attribute 'sliceWidget'
loadSourceAsModule - Failed to load file "/home/mingrui/.config/NA-MIC/Extensions-26813/SlicerPathology/lib/Slicer-4.8/qt-scripted-modules/SlicerPathology.py"  as module "SlicerPathology" ! 
Fail to instantiate module  "SlicerPathology" 
Number of instantiated modules: 143 
Number of loaded modules: 143 

selection_039

mingrui commented 6 years ago

found this solution similar to this, the problem is with indentation, you need to use 4 spaces as indentation on these lines:

(Do NOT follow solution in this thread, if you comment out these lines, you won't be able to load png files.) https://discourse.slicer.org/t/pathology-module-install-fail-due-to-slicewidget-attribute-error/2269

This is the correct solution, just indent these lines selection_040