Skip to content

Commit

Permalink
FIX: inv3 file save in temp and unicode chars in path of dicom to be …
Browse files Browse the repository at this point in the history
…imported
  • Loading branch information
tatiana committed Mar 8, 2010
1 parent ed5fcc9 commit caee8fc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 0 additions & 3 deletions invesalius/data/measures.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ def _load_measurements(self, pubsub_evt):
else:
ps.Publisher().sendMessage('Update slice viewer')

session = ses.Session()
session.SaveProject()

def _add_point(self, pubsub_evt):
position = pubsub_evt.data[0]
type = pubsub_evt.data[1] # Linear or Angular
Expand Down
7 changes: 4 additions & 3 deletions invesalius/invesalius.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@
if sys.platform == 'win32':
import _winreg

import wxversion
wxversion.ensureMinimal('2.8-unicode', optionsRequired=True)
wxversion.select('2.8-unicode', optionsRequired=True)
if sys.platform != 'win32':
import wxversion
wxversion.ensureMinimal('2.8-unicode', optionsRequired=True)
wxversion.select('2.8-unicode', optionsRequired=True)

import wx
import wx.lib.pubsub as ps
Expand Down
6 changes: 5 additions & 1 deletion invesalius/session.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import ConfigParser
import os
import shutil
import sys
from threading import Thread
import time

Expand Down Expand Up @@ -138,7 +139,10 @@ def CreateSessionFile(self):
config.add_section('paths')
config.set('paths','homedir',self.homedir)
config.set('paths','tempdir',self.tempdir)
config.set('paths','last_dicom_folder',self.last_dicom_folder.encode('utf-8'))
try:
config.set('paths','last_dicom_folder',self.last_dicom_folder.encode('utf-8'))
except (UnicodeEncodeError, UnicodeDecodeError):
config.set('paths','last_dicom_folder',self.last_dicom_folder)
path = os.path.join(self.homedir ,
'.invesalius', 'config.cfg')

Expand Down

0 comments on commit caee8fc

Please sign in to comment.