          if not message:
              logger.trace("Error creating ffmpeg message. Returning False")
              return False
  
          self.statusbar.progress_update(message, 0, False)
          logger.trace("Succesfully captured ffmpeg message: %s", message)
          return True
  
      def terminate(self):
          """ Terminate the running process in a LongRunningTask so we can still
              output to console """
 
</s> remove     def terminate(self):
        """ Terminate the running process in a LongRunningTask so we can still
            output to console """
        if self.thread is None:
 </s> add     def terminate(self) -> None:
        """ Terminate the running process in a LongRunningTask so console can still be updated
        console """
        if self._thread is None: </s> remove             logger.trace("Error creating ffmpeg message. Returning False")
 </s> add             logger.trace(  # type:ignore[attr-defined]
                "Error creating ffmpeg message. Returning False") </s> remove     def capture_ffmpeg(self, string):
        """ Capture tqdm output for progress bar """
        logger.trace("Capturing ffmpeg")
        ffmpeg = self.consoleregex["ffmpeg"].findall(string)
 </s> add     def _capture_ffmpeg(self, string: str) -> bool:
        """ Capture ffmpeg output for progress bar

        Parameters
        ----------
        string: str
            An output line read from stdout

        Returns
        -------
        bool
            ``True`` if an ffmpeg line was captured from stdout, otherwise ``False``
        """
        logger.trace("Capturing ffmpeg")  # type:ignore[attr-defined]
        ffmpeg = self._consoleregex["ffmpeg"].findall(string) </s> remove             self.thread = LongRunningTask(target=self.terminate_in_thread,
                                          args=(self.command, self.process))
            if self.command == "train":
                self.wrapper.tk_vars.is_training.set(False)
            self.thread.start()
            self.config.root.after(1000, self.terminate)
        elif not self.thread.complete.is_set():
 </s> add             self._thread = LongRunningTask(target=self._terminate_in_thread,
                                           args=(self._command, self._process))
            if self._command == "train":
                get_config().tk_vars.is_training.set(False)
            self._thread.start()
            self._config.root.after(1000, self.terminate)
        elif not self._thread.complete.is_set(): </s> remove             logger.trace("Not ffmpeg message. Returning False")
 </s> add             logger.trace("Not ffmpeg message. Returning False")  # type:ignore[attr-defined]
        self._statusbar.progress_update(message, 0, False)
        logger.trace("Succesfully captured ffmpeg message: %s",  # type:ignore[attr-defined]
                     message)
          if not message:
              logger.trace("Error creating ffmpeg message. Returning False")
              return False
  
        self._statusbar.progress_update(message, 0, False)
        logger.trace("Succesfully captured ffmpeg message: %s",  # type:ignore[attr-defined]
                     message)
        self._statusbar.progress_update(message, 0, False)
        logger.trace("Succesfully captured ffmpeg message: %s",  # type:ignore[attr-defined]
                     message)
          return True
  
      def terminate(self):
          """ Terminate the running process in a LongRunningTask so we can still
              output to console """
keep keep keep keep replace replace keep keep keep keep keep
 bugfix: GUI force stdout/stderr reading to utf-8 
lib/gui/wrapper.py