Commit 49c1f7b234ac5d266515c86e589ea7dd959a1a93
1 parent
680be8e5
Exists in
master
and in
3 other branches
FIX: problem with encoding on importing dicom, reported by the user p passant in InVesalius forum
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
invesalius/reader/dicom.py
@@ -1486,6 +1486,8 @@ class Parser(): | @@ -1486,6 +1486,8 @@ class Parser(): | ||
1486 | try: | 1486 | try: |
1487 | data = self.data_image[str(0x0008)][str(0x1030)] | 1487 | data = self.data_image[str(0x0008)][str(0x1030)] |
1488 | if (data): | 1488 | if (data): |
1489 | + if isinstance(data, unicode): | ||
1490 | + return data | ||
1489 | encoding = self.GetEncoding() | 1491 | encoding = self.GetEncoding() |
1490 | return data.decode(encoding) | 1492 | return data.decode(encoding) |
1491 | except(KeyError): | 1493 | except(KeyError): |