Commit 849cc868810add661a4185d9f4a4a5583528b6c7

Authored by Paulo Henrique Junqueira Amorim
1 parent 5007ecbb

FIX: Fix problem unicode

Showing 1 changed file with 5 additions and 1 deletions   Show diff stats
invesalius/reader/dicom_reader.py
@@ -20,6 +20,7 @@ import os @@ -20,6 +20,7 @@ import os
20 import Queue 20 import Queue
21 import threading 21 import threading
22 import tempfile 22 import tempfile
  23 +import sys
23 24
24 from multiprocessing import cpu_count 25 from multiprocessing import cpu_count
25 26
@@ -90,7 +91,10 @@ class LoadDicom:#(threading.Thread): @@ -90,7 +91,10 @@ class LoadDicom:#(threading.Thread):
90 def __init__(self, grouper, filepath): 91 def __init__(self, grouper, filepath):
91 #threading.Thread.__init__(self) 92 #threading.Thread.__init__(self)
92 self.grouper = grouper 93 self.grouper = grouper
93 - self.filepath = filepath 94 + if sys.platform == 'win32':
  95 + self.filepath = filepath.encode(utils.get_system_encode())
  96 + else:
  97 + self.filepath = filepath
94 self.run() 98 self.run()
95 99
96 def run(self): 100 def run(self):