When I was calling self.serial_console.get_output(), I met UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 12192: invalid start byte.
One possible quick solution will be:
aexpect/client.py +319
@@ -314,8 +315,8 @@ def get_output(self):
Return the STDOUT and STDERR output of the process so far.
"""
try:
- with open(self.output_filename, 'r') as output_file:
- return output_file.read()
+ with open(self.output_filename, 'rb') as output_file:
+ return output_file.read().decode(errors="ignore")
except IOError:
return None
What is your opinion?
@clebergnu @ldoktor @chunfuwen