Pathology module install fail due to sliceWidget attribute error

hello,

[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]

  1. if I input the following code in Python Interactor, there is no error message
    red_logic = slicer.app.layoutManager().sliceWidget(“Red”).sliceLogic()
  2. 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

Alvin

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:

@Alvin_Chen can you give that a try?

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

red_logic = slicer.app.layoutManager().sliceWidget(“Red”).sliceLogic()

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.

@fedorov do you know the status?

1 Like

I don’t. SBU team maintains this module. @tdiprima can you comment?

I filed an issue for reference https://github.com/SBU-BMI/SlicerPathology/issues/100

1 Like

hi Steve

thanks for your information
in my ubuntu 16.04 platform
Pathology module work after this following two steps

  1. remove line 749-783 (all non-subroutine code) in SlicerPathology.py
  2. fix the following subroutine’s indent error in SlicerPathology.py
    • Four2ThreeChannel
    • loadTCGAData
    • clear_and_open
    • loademup

Alvin

1 Like

Great thanks for reporting @Alvin_Chen. You might consider making a pull request with the fixes to the SlicerPathology repository.

Thanks Alvin for reporting this! We’ll take a look at this and get it fixed. - Erich

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.

Hi all,
I’m trying to find the Pathology module into the extension manager (Linux nightly build) but it looks like it’s missing.
Any idea?

Thanks a lot :slight_smile:

Paolo

@ebremer it appears that SlicerPathology build is currently failing for all operating systems on the dashboard: http://slicer.cdash.org/index.php?project=SlicerPreview&filtercount=1&showfilters=1&field1=buildname&compare1=63&value1=SlicerPathology.

Hi all,
any news about this module?

Thank you very much!

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.

Thank you very much @fedorov !

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.

Great news!
Thank you again.

Paolo