1 min readMay 29, 2020
Hi Paul, sorry to hear you are getting this error.
Even if there are no DICOM files, it should still just return an empty list without any errors.
Can you try replacing the line with the following:
slices = [pydicom.dcmread(os.path.join(path, s)) for s in os.listdir(path)]
Let me know if you are still getting errors!