[environment]
MacOS 10.13.3 /Ubuntu 16.04 /Win10 have same behavior
Slicer 4.8.1
[Description]
when I install pathology module by Extension Manager, after restart slicer
I will get the following error message in Python Interactor, and there is no Pathology option in module list
Traceback (most recent call last):
File “”, line 1, in
File “/Applications/Slicer.app/Contents/Extensions-26813/SlicerPathology/lib/Slicer-4.8/qt-scripted-modules/SlicerPathology.py”, line 749, in
red_logic = slicer.app.layoutManager().sliceWidget(“Red”).sliceLogic()
AttributeError: ‘NoneType’ object has no attribute ‘sliceWidget’
[btw]
if I input the following code in Python Interactor, there is no error message
red_logic = slicer.app.layoutManager().sliceWidget(“Red”).sliceLogic()
if i modify SlicerPathology.py", line 749 as
lm = slicer.app.layoutManager() ==> no error message
red_logic = lm.sliceWidget(“Red”).sliceLogic() ==> fail in this line
It looks like that module is doing things at the global level (during module discovery) that should really not happen until the application has finished start up.
That code should be wrapped in a function and connected to a signal like this:
hi Steve
i am not sure my modification is corrected or not.
in SlicerPathology.py, i add a similar code to end of SlicerPathology class, but it is not work
i got same error message.
btw, in my previous experiment 1)
if I input the following single-line code in Python Interactor, there is no error message
since all platform have same behavior, could you reproduce this case?
29 class SlicerPathology(ScriptedLoadableModule):
30 def __init__(self, parent):
31 ScriptedLoadableModule.__init__(self, parent)
32 self.parent.title = "Slicer Pathology"
33 self.parent.categories = ["Pathology"]
34 self.parent.dependencies = []
35 self.parent.contributors = ["Erich Bremer, Joel Saltz, Yi Gao, Tammy DiPrima (Stony Brook University)"]
36 self.parent.helpText = """
37 Automatic and semi-automatic pathology segmentation tools.
38 """
39 self.parent.acknowledgementText = """
40 This file was originally developed by Jean-Christophe Fillion-Robin, Kitware Inc.
41 and Steve Pieper, Isomics, Inc. and was partially funded by NIH grant 3P41RR013218-12S1.
42 """ # replace with organization, grant and thanks.
43 slicer.app.connect("startupCompleted()", self.SlicerPathologyWidget) <-- this line
Actually it looks like that code was added by mistake - you should just delete those lines and see if the if you are able to use the rest of the module as expected.
To follow up on this issue, @ebremer committed a fix that should resolve the problem in the next nightly. Please report if you have troubles with the extension.
I’ve just emailed directly the developers and the PI of the project, will let you know if/when they respond, and whether we get any clarity on the status of support for this extension.
Here’s the response I received from Joel Saltz, who is the PI of the effort:
Yes, we will be maintaining the extension and we are also plan a new version that leverages software components that we’ve developed over the past couple of years as part of our QuIP U24. Erich will get the current version back up and running very soon.
Hopefully @ebremer will get back to this sometime soon.