X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=functions.py;h=8f15198127e6253f737eab586700842235da0e71;hp=28d648e6555105257e3d8bb83a41f42da7e32b56;hb=f89443607fdb078b159267a8eaaececaab76ba08;hpb=42a67a41b64a6e0cc3fd2a63a0749e9aa4b9374c diff --git a/functions.py b/functions.py index 28d648e..8f15198 100644 --- a/functions.py +++ b/functions.py @@ -88,9 +88,10 @@ class History : self.read() def addmultiple(self, analyses) : + log.info('add multiple') for analyse in analyses : tosave = {'uuid' : analyse['uuid'], 'ira': analyse['ira'], 'type' : analyse['type']} - corpus = analyse['uuid'] + corpus = analyse['corpus'] tosave['corpus'] = corpus tosave['name'] = analyse['name'] if corpus in self.corpus : @@ -102,6 +103,7 @@ class History : self.read() def delete(self, analyse, corpus = False) : + log.info('delete %s' % analyse.get('name', 'noname')) if corpus : self.history.pop(self.ordercorpus[analyse['uuid']]) if analyse['uuid'] in self.openedcorpus : @@ -427,7 +429,7 @@ def BugReport(parent, error = None): txt = exc else : if exc in exceptions : - txt = exceptions[mss] + txt = exceptions[exc] else : txt = exc title = "Information" @@ -531,13 +533,13 @@ def exec_rcode(rpath, rcode, wait = True, graph = False): if sys.platform == 'win32': error = call(["%s" % rpath, "--vanilla","--slave","-f", "%s" % rcode]) else : - error = call([rpath, '--vanilla','--slave',"-f %s" % rcode]) + error = call([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"]) return error else : if sys.platform == 'win32': pid = Popen(["%s" % rpath, '--vanilla','--slave','-f', "%s" % rcode]) else : - pid = Popen([rpath, '--vanilla','--slave',"-f %s" % rcode], stderr = PIPE) + pid = Popen([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"], stderr = PIPE) return pid else : if wait : @@ -545,18 +547,18 @@ def exec_rcode(rpath, rcode, wait = True, graph = False): error = call(["%s" % rpath, '--vanilla','--slave','-f', "%s" % rcode]) elif sys.platform == 'darwin' and needX11: os.environ['DISPLAY'] = ':0.0' - error = call([rpath, '--vanilla','--slave',"-f %s" % rcode]) + error = call([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"]) else : - error = call([rpath, '--vanilla','--slave',"-f %s" % rcode]) + error = call([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"]) return error else : if sys.platform == 'win32': pid = Popen(["%s" % rpath, '--vanilla','--slave','-f', "%s" % rcode]) elif sys.platform == 'darwin' and needX11: os.environ['DISPLAY'] = ':0.0' - pid = Popen([rpath, '--vanilla','--slave',"-f %s" % rcode], stderr = PIPE) + pid = Popen([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"], stderr = PIPE) else : - pid = Popen([rpath, '--vanilla','--slave',"-f %s" % rcode], stderr = PIPE) + pid = Popen([rpath, '--vanilla','--slave',"-f %s" % rcode, "--encoding=UTF-8"], stderr = PIPE) return pid def check_Rresult(parent, pid) :