Summary |
0004474: TypeError in DICOMUtils |
|
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:
- If
loadPatientByName input is not a name of a patient in the DICOM database
- If
loadPatientByUID input is not an index of a patient in the DICOM database (between 1 and the number of patients in the database)
- If
loadSeriesByUID input is a singleton (even valid UID)
- if
loadSeriesByUID input list has only one item that is not a valid UID
|
|
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:
- If
loadPatientByName input is not a name of a patient in the DICOM database
- If
loadPatientByUID input is not an index of a patient in the DICOM database (between 1 and the number of patients in the database)
- If
loadSeriesByUID input is a singleton (even valid UID)
- if
loadSeriesByUID input list has only one item that is not a valid UID
|
|
Revision |
2017-11-09 10:06 by alexis.girault |
|
Steps To Reproduce |
In python interactor:
import DICOMLib as d
d.loadPatientByName("invalid_name")
d.loadPatientByUID("invalid_patient_index")
d.loadSeriesByUID("valid_serie_UID")
d.loadSeriesByUID(["invalid_serie_UID"])
|
|
Revision |
2017-11-09 10:07 by alexis.girault |
|
Steps To Reproduce |
In python interactor:
import DICOMLib as d
d.loadPatientByName("invalid_name")
d.loadPatientByUID("invalid_patient_index")
d.loadSeriesByUID("valid_serie_UID")
d.loadSeriesByUID(["invalid_serie_UID"])
|
|
Revision |
2017-11-09 10:06 by alexis.girault |
|
Additional Information |
Regarding 0000002: loadPatientByUID input is not a UID, but the index of the patient in the DICOM database (between '1' and the number of patients in the list). That does not seem to be the expected behavior:
d.loadPatientByUID(1) -> works (if at least one patient is in the database)
d.loadPatientByUID('valid_patient_UID') -> fails with TypeError. |
|
Revision |
2017-11-09 10:07 by alexis.girault |
|
Additional Information |
Regarding 0000002: loadPatientByUID input is not a UID, but the index of the patient in the DICOM database (between '1' and the number of patients in the list). That does not seem to be the expected behavior:
d.loadPatientByUID(1) # works (if at least one patient is in the database)
d.loadPatientByUID('valid_patient_UID') # fails with TypeError.
|
|
Revision |
2017-11-09 10:08 by alexis.girault |
|
Additional Information |
Regarding the second case: loadPatientByUID input is not a UID, but the index of the patient in the DICOM database (between '1' and the number of patients in the list). That does not seem to be the expected behavior:
d.loadPatientByUID(1) # works (if at least one patient is in the database)
d.loadPatientByUID('valid_patient_UID') # fails with TypeError.
|