Closed che85 closed 7 months ago
It should be
_(
"Source volume - without any additional patient information -"
" will be sent to remote data processing server: {server_url}.\n\n"
"Click 'OK' to proceed with the segmentation.\n"
"Click 'Cancel' to not upload any data and cancel segmentation.\n"
).format(server_url=self.serverUrl()),
_()
is for internationalization (to be able to translate the message to different languages). The named placeholder is not strictly needed if there is only a single placeholder, but useful for translators.
Could you test if the fix above works and maybe submit a pull request to MONAILabel?
I had the same problem “Failed to run inference in MONAl Label Server.”
Traceback (most recent call last): File "/Applications/Slicer.app/Contents/Extensions-32390/MONAILabel/lib/Slicer-5.6/qt-scripted-modules/MONAILabel.py", line 1545, in onClickSegmentation result_file, params = self.logic.infer(model, image_file, params, session_id=self.getSessionId()) File "/Applications/Slicer.app/Contents/Extensions-32390/MONAILabel/lib/Slicer-5.6/qt-scripted-modules/MONAILabel.py", line 1526, in getSessionId self.onUploadImage(initsample=False, session=True) File "/Applications/Slicer.app/Contents/Extensions-32390/MONAILabel/lib/Slicer-5.6/qt-scripted-modules/MONAILabel.py", line 1376, in onUploadImage if not self.getPermissionForImageDataUpload(): File "/Applications/Slicer.app/Contents/Extensions-32390/MONAILabel/lib/Slicer-5.6/qt-scripted-modules/MONAILabel.py", line 1363, in getPermissionForImageDataUpload ( IndexError: Replacement index 0 out of range for positional args tuple
commit https://github.com/Project-MONAI/MONAILabel/commit/055fdc2427d6313e4b1c11cff067a6f9e4d97fa2 introduces a bug
When using 3D Slicer and trying to upload an image to the server
https://github.com/Project-MONAI/MONAILabel/blob/ac0af6d4886bcd10f4a7f09419446ba0ba20eca0/plugins/slicer/MONAILabel/MONAILabel.py#L1363-L1368
if using string formatting, it should be
I don't know if any other functionality is affected by that commit.