Is MonaiLabel functional?

I am trying to use MonaiLabel on windows build from 6/28 (4.13.0-2021-06-28 r30015 / 1807944). Extension is installed, but when Slicer starts there is this error in Python window:

RuntimeError: qSlicerScriptedLoadableModule::setPythonSource - Failed to load scripted loadable module: class client was not found in file C:/Users/amaga/AppData/Local/NA-MIC/Slicer 4.13.0-2021-06-28/NA-MIC/Extensions-30015/MONAILabel/lib/Slicer-4.13/qt-scripted-modules/client.py

When I switch to the Monai module and when I type in the Monai server address, I get this:

Traceback (most recent call last):
File “C:/Users/amaga/AppData/Local/NA-MIC/Slicer 4.13.0-2021-06-28/NA-MIC/Extensions-30015/MONAILabel/lib/Slicer-4.13/qt-scripted-modules/MONAILabel.py”, line 667, in fetchInfo
info = self.logic.info()
File “C:/Users/amaga/AppData/Local/NA-MIC/Slicer 4.13.0-2021-06-28/NA-MIC/Extensions-30015/MONAILabel/lib/Slicer-4.13/qt-scripted-modules/MONAILabel.py”, line 1225, in info
return MONAILabelClient(self.server_url, self.tmpdir).info()
File “C:\Users\amaga\AppData\Local\NA-MIC\Slicer 4.13.0-2021-06-28\NA-MIC\Extensions-30015\MONAILabel\lib\Slicer-4.13\qt-scripted-modules\client.py”, line 26, in info
status, response, _ = MONAILabelUtils.http_method(“GET”, self._server_url, selector)
File “C:/Users/amaga/AppData/Local/NA-MIC/Slicer 4.13.0-2021-06-28/NA-MIC/Extensions-30015/MONAILabel/lib/Slicer-4.13/qt-scripted-modules/client.py”, line 158, in http_method
conn = http.client.HTTPConnection(parsed.hostname, parsed.port)
File “C:\Users\amaga\AppData\Local\NA-MIC\Slicer 4.13.0-2021-06-28\lib\Python\Lib\http\client.py”, line 849, in init
(self.host, self.port) = self._get_hostport(host, port)
File “C:\Users\amaga\AppData\Local\NA-MIC\Slicer 4.13.0-2021-06-28\lib\Python\Lib\http\client.py”, line 881, in _get_hostport
i = host.rfind(‘:’)
AttributeError: ‘NoneType’ object has no attribute ‘rfind’

Server is accessible through the web browser installed on the machine that’s running slicer:

This is a very, very old build for MONAILabel. There are dozens of commits every week. The client.py warning and many other issues were fixed long time ago. Please try the latest (maximum 1-2 days old) version and submit a bug report if something is broken.

Good to know. At this point I can’t try a recent build due to these two issues;

You can simply unzip the content of the extension package and add the loadable, scripted, and CLI module folders to additional module paths.

You can also use the extension manager from a mobile network or at home to download Slicer and install extensions, then copy it to a USB stick. Slicer Preview Releases are fully portable applications, so they run without any installation.

OK. I forgot about that method of manually installing. Will try. Hopefully those extension manager issues will get fixed soon though…

1 Like

I think @jcfr will return next week and this will be probably quite high on his priority list.

2 Likes

Pinging @diazandr3s so he’s aware of this thread.

1 Like

@Fernando many thanks for the ping! As Andras commented, MONAI Label is under continuous development. Three days is almost history for this project :smiley:

1 Like