diff --git a/client/experimental_client_with_swig/output_grabber.py b/client/experimental_client_with_swig/output_grabber.py index a62d6f056..ca9828149 100755 --- a/client/experimental_client_with_swig/output_grabber.py +++ b/client/experimental_client_with_swig/output_grabber.py @@ -72,7 +72,7 @@ class OutputGrabber(object): and save the text in `capturedtext`. """ while True: - char = os.read(self.pipe_out,1).decode(self.origstream.encoding) + char = os.read(self.pipe_out,1).decode(self.origstream.encoding, errors='replace') if not char or self.escape_char in char: break self.capturedtext += char diff --git a/client/experimental_lib/example_py/output_grabber.py b/client/experimental_lib/example_py/output_grabber.py index a62d6f056..ca9828149 100755 --- a/client/experimental_lib/example_py/output_grabber.py +++ b/client/experimental_lib/example_py/output_grabber.py @@ -72,7 +72,7 @@ class OutputGrabber(object): and save the text in `capturedtext`. """ while True: - char = os.read(self.pipe_out,1).decode(self.origstream.encoding) + char = os.read(self.pipe_out,1).decode(self.origstream.encoding, errors='replace') if not char or self.escape_char in char: break self.capturedtext += char