TypeError: can only concatenate list (not “MultiValue”) to list #72
If anyone is using pydicom=1.0.2 instead of the older pydicom=0.9.9, you will get an exception during the preprocessing step:
TypeError: can only concatenate list (not “MultiValue”) to list
The exception is raised at line 50 of preprocessing/step1.py. You can fix it by replacing the original version of line 50:
return np.array(image, dtype=np.int16), np.array([slices[0].SliceThickness] + slices[0].PixelSpacing, dtype=np.float32)
with this version:
return np.array(image, dtype=np.int16), np.array([slices[0].SliceThickness, slices[0].PixelSpacing[0], slices[0].PixelSpacing[1]], dtype=np.float32)
(The second version of line 50 works with either version of pydicom.)