diff --git a/rapids/models.py b/rapids/models.py index 0925d5d0..d67a33f2 100644 --- a/rapids/models.py +++ b/rapids/models.py @@ -459,7 +459,7 @@ class RapidImage(models.Model): try: # and generate a hash from the pixel data dataset = pydicom.dcmread(self.image) - hash = hashlib.md5(",".join(str(dataset.pixel_array.tostring()))).hexdigest() + hash = hashlib.md5(",".join([str(i) for i in dataset.pixel_array.tostring()])).hexdigest() self.is_dicom = True except pydicom.errors.InvalidDicomError: self.image.file.open()