From 6d99759d1073b6d99d7e38e29d0e9a926df19ac5 Mon Sep 17 00:00:00 2001 From: paulojamorim Date: Fri, 3 Dec 2010 11:22:36 +0000 Subject: [PATCH] FIX: Unicode problem in importation --- invesalius/reader/dicom_reader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invesalius/reader/dicom_reader.py b/invesalius/reader/dicom_reader.py index 50303fe..55c9e3b 100644 --- a/invesalius/reader/dicom_reader.py +++ b/invesalius/reader/dicom_reader.py @@ -105,7 +105,7 @@ class LoadDicom(threading.Thread): break reader = gdcm.Reader() - reader.SetFileName(str(filepath)) + reader.SetFileName(filepath.encode('utf-8')) if (reader.Read()): file = reader.GetFile() @@ -211,7 +211,7 @@ class LoadDicom(threading.Thread): write_png.Write() # ---------- Refactory -------------------------------------- - data_dict['invesalius'] = {'orientation_label' : GetImageOrientationLabel(str(filepath))} + data_dict['invesalius'] = {'orientation_label' : GetImageOrientationLabel(filepath.encode('utf-8'))} # ------------------------------------------------------------- dict_file[filepath] = data_dict -- libgit2 0.21.2