diff --git a/launch/launch/actions/execute_process.py b/launch/launch/actions/execute_process.py index b54f3be7a..650326835 100644 --- a/launch/launch/actions/execute_process.py +++ b/launch/launch/actions/execute_process.py @@ -300,7 +300,7 @@ def __on_process_stdin( def __on_process_stdout( self, event: ProcessIO ) -> Optional[SomeActionsType]: - for line in event.text.decode().splitlines(): + for line in event.text.decode(errors='replace').splitlines(): self.__stdout_logger.info( self.__output_format.format(line=line, this=self) ) @@ -308,7 +308,7 @@ def __on_process_stdout( def __on_process_stderr( self, event: ProcessIO ) -> Optional[SomeActionsType]: - for line in event.text.decode().splitlines(): + for line in event.text.decode(errors='replace').splitlines(): self.__stderr_logger.info( self.__output_format.format(line=line, this=self) )