From dbeb1b862a7a3857a79c9634813b33cd2abe7e20 Mon Sep 17 00:00:00 2001 From: Mario Fink Date: Thu, 15 Apr 2021 23:51:44 +0200 Subject: [PATCH] py_imc_termite.pyx: print_table: encoding, xdata --- cython/py_imc_termite.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cython/py_imc_termite.pyx b/cython/py_imc_termite.pyx index fc78641..44506b9 100644 --- a/cython/py_imc_termite.pyx +++ b/cython/py_imc_termite.pyx @@ -32,10 +32,10 @@ cdef class imctermite: def print_table(self, string outputfile): chnlst = self.cpp_imc.get_channels(True,True) chnlstjn = [jn.loads(chn.decode()) for chn in chnlst] - with open(outputfile,'w') as fout: + with open(outputfile.decode(),'w') as fout: for chn in chnlstjn: fout.write(str(chn['yname']).rjust(20)+str(chn['xname']).rjust(20)+'\n') fout.write(str(chn['yunit']).rjust(20)+str(chn['xunit']).rjust(20)+'\n') for n in range(0,len(chn['ydata'])): fout.write(str(chn['ydata'][n]).rjust(20)+ - str(chn['ydata'][n]).rjust(20)+'\n') + str(chn['xdata'][n]).rjust(20)+'\n')