Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  08 Jul 2021, Francesco Renga, Forum, Problem with python file reader 
    Reply  09 Jul 2021, Ben Smith, Forum, Problem with python file reader 
Message ID: 2254     Entry time: 08 Jul 2021     Reply to this: 2255
Author: Francesco Renga 
Topic: Forum 
Subject: Problem with python file reader 
Dear experts,
       while trying to readout a MIDAS file from a python script. I get the error below at the very first event. Any hint?

Thank you very much,

  File "/home/cygno/DAQ/offline/", line 9, in <module>
    for event in mfile:
  File "/home/cygno/DAQ/python/midas/", line 159, in __next__
    ev = self.read_next_event()
  File "/home/cygno/DAQ/python/midas/", line 264, in read_next_event
    return self.read_this_event_body()
  File "/home/cygno/DAQ/python/midas/", line 307, in read_this_event_body
    self.event.unpack_body(body_data, 0, self.use_numpy)
  File "/home/cygno/DAQ/python/midas/", line 648, in unpack_body
    bank.fill_header_from_bytes(bank_header_data, self.is_bank_32(), self.is_bank_data_64bit_aligned())
  File "/home/cygno/DAQ/python/midas/", line 298, in fill_header_from_bytes = "".join(x.decode('ascii') for x in unpacked[:4])
  File "/home/cygno/DAQ/python/midas/", line 298, in <genexpr> = "".join(x.decode('ascii') for x in unpacked[:4])
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc8 in position 0: ordinal not in range(128)
ELOG V3.1.4-2e1708b5