View Revisions: Issue #4474

Summary 0004474: TypeError in DICOMUtils
Revision 2017-11-09 10:07 by alexis.girault
Description

if DICOMUtils.loadSeriesByUID input is not a LIST of VALID UIDS, then we get:

  File ".../qt-scripted-modules/DICOMLib/DICOMUtils.py", line 52, in loadSeriesByUID
    dicomWidget.detailsPopup.examineForLoading()
  File ".../qt-scripted-modules/DICOMLib/DICOMWidgets.py", line 661, in examineForLoading
    self.loadablesByPlugin, loadEnabled = self.getLoadablesFromFileLists(self.fileLists)
TypeError: 'NoneType' object is not iterable

Which means it will not fail gracefully in the following cases:

  1. If loadPatientByName input is not a name of a patient in the DICOM database
  2. If loadPatientByUID input is not an index of a patient in the DICOM database (between 1 and the number of patients in the database)
  3. If loadSeriesByUID input is a singleton (even valid UID)
  4. if loadSeriesByUID input list has only one item that is not a valid UID
Revision 2017-11-09 10:06 by alexis.girault
Description

if DICOMUtils.loadSeriesByUID input is not a LIST of VALID UIDS, then we get:

  File ".../qt-scripted-modules/DICOMLib/DICOMUtils.py", line 52, in loadSeriesByUID
    dicomWidget.detailsPopup.examineForLoading()
  File ".../qt-scripted-modules/DICOMLib/DICOMWidgets.py", line 661, in examineForLoading
    self.loadablesByPlugin, loadEnabled = self.getLoadablesFromFileLists(self.fileLists)
TypeError: 'NoneType' object is not iterable

Which means it will not fail gracefully in the following cases:

  1. If loadPatientByName input is not a name of a patient in the DICOM database
  2. If loadPatientByUID input is not an index of a patient in the DICOM database (between 1 and the number of patients in the database)
  3. If loadSeriesByUID input is a singleton (even valid UID)
  4. if loadSeriesByUID input list has only one item that is not a valid UID