  
          iterations += 1
          self.train_stats["iterations"] = iterations
  
          elapsed = self.calc_elapsed()
          message = (f"Elapsed: {elapsed} | "
                     f"Session Iterations: {self.train_stats['iterations']}  {message}")
          self.statusbar.progress_update(message, 0, False)
          logger.trace("Succesfully captured loss: %s", message)
          return True
 
</s> remove                    f"Session Iterations: {self.train_stats['iterations']}  {message}")
        self.statusbar.progress_update(message, 0, False)
        logger.trace("Succesfully captured loss: %s", message)
 </s> add                    f"Session Iterations: {self._train_stats['iterations']}  {message}")
        self._statusbar.progress_update(message, 0, False)
        logger.trace("Succesfully captured loss: %s", message)  # type:ignore[attr-defined] </s> remove         self.train_stats["iterations"] = iterations
 </s> add         self._train_stats["iterations"] = iterations </s> remove             self.train_stats["timestamp"] = time()
 </s> add             self._train_stats["timestamp"] = time() </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             logger.trace("Error creating loss message. Returning False")
 </s> add             logger.trace(  # type:ignore[attr-defined]
                "Error creating loss message. Returning False")
        elapsed = self._calculate_elapsed()
  
          iterations += 1
          self.train_stats["iterations"] = iterations
  
        elapsed = self._calculate_elapsed()
          message = (f"Elapsed: {elapsed} | "
                     f"Session Iterations: {self.train_stats['iterations']}  {message}")
          self.statusbar.progress_update(message, 0, False)
          logger.trace("Succesfully captured loss: %s", message)
          return True
keep keep keep keep replace keep keep keep keep keep
 bugfix: GUI force stdout/stderr reading to utf-8 
lib/gui/wrapper.py