Commit 6d99759d1073b6d99d7e38e29d0e9a926df19ac5

Authored by Paulo Henrique Junqueira Amorim
1 parent d4fcee3b

FIX: Unicode problem in importation

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
invesalius/reader/dicom_reader.py
... ... @@ -105,7 +105,7 @@ class LoadDicom(threading.Thread):
105 105 break
106 106  
107 107 reader = gdcm.Reader()
108   - reader.SetFileName(str(filepath))
  108 + reader.SetFileName(filepath.encode('utf-8'))
109 109  
110 110 if (reader.Read()):
111 111 file = reader.GetFile()
... ... @@ -211,7 +211,7 @@ class LoadDicom(threading.Thread):
211 211 write_png.Write()
212 212  
213 213 # ---------- Refactory --------------------------------------
214   - data_dict['invesalius'] = {'orientation_label' : GetImageOrientationLabel(str(filepath))}
  214 + data_dict['invesalius'] = {'orientation_label' : GetImageOrientationLabel(filepath.encode('utf-8'))}
215 215  
216 216 # -------------------------------------------------------------
217 217 dict_file[filepath] = data_dict
... ...