          if not message:
              logger.trace("Error creating loss message. Returning False")
              return False
  
          iterations = self.train_stats["iterations"]
  
          if iterations == 0:
              # Set initial timestamp
              self.train_stats["timestamp"] = time()
  
 
</s> remove             logger.trace("Error creating loss message. Returning False")
 </s> add             logger.trace(  # type:ignore[attr-defined]
                "Error creating loss message. Returning False") </s> remove             self.train_stats["timestamp"] = time()
 </s> add             self._train_stats["timestamp"] = time() </s> remove         self.train_stats["iterations"] = iterations
 </s> add         self._train_stats["iterations"] = iterations </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("Not loss message. Returning False")
 </s> add             logger.trace("Not loss message. Returning False")  # type:ignore[attr-defined]
        iterations = self._train_stats["iterations"]
        assert isinstance(iterations, int)
          if not message:
              logger.trace("Error creating loss message. Returning False")
              return False
  
        iterations = self._train_stats["iterations"]
        assert isinstance(iterations, int)
  
          if iterations == 0:
              # Set initial timestamp
              self.train_stats["timestamp"] = time()
  
keep keep keep keep replace keep keep keep keep keep
 bugfix: GUI force stdout/stderr reading to utf-8 
lib/gui/wrapper.py