          """ Calculate and format time since training started """
          now = time()
          elapsed_time = now - self.train_stats["timestamp"]
          try:
              hrs = int(elapsed_time // 3600)
              if hrs < 10:
                  hrs = f"{hrs:02d}"
              mins = f"{(int(elapsed_time % 3600) // 60):02d}"
              secs = f"{(int(elapsed_time % 3600) % 60):02d}"
          except ZeroDivisionError:
              hrs = "00"
              mins = "00"
 
</s> remove         elapsed_time = now - self.train_stats["timestamp"]
 </s> add         timestamp = self._train_stats["timestamp"]
        assert isinstance(timestamp, float)
        elapsed_time = now - timestamp </s> remove             hrs = "00"
            mins = "00"
            secs = "00"
 </s> add             hrs = mins = secs = "00" </s> remove     def calc_elapsed(self):
        """ Calculate and format time since training started """
 </s> add     def _calculate_elapsed(self) -> str:
        """ Calculate and format time since training started

        Returns
        -------
        str
            The amount of time elapsed since training started in HH:mm:ss format
        """ </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     def capture_tqdm(self, string):
        """ Capture tqdm output for progress bar """
        logger.trace("Capturing tqdm")
        tqdm = self.consoleregex["tqdm"].match(string)
        if not tqdm:
 </s> add     def _capture_tqdm(self, string: str) -> bool:
        """ Capture tqdm output for progress bar

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

        Returns
        -------
        bool
            ``True`` if a tqdm line was captured from stdout, otherwise ``False``
        """
        logger.trace("Capturing tqdm")  # type:ignore[attr-defined]
        mtqdm = self._consoleregex["tqdm"].match(string)
        if not mtqdm:
            i_hrs = int(elapsed_time // 3600)
            hrs = f"{i_hrs:02d}" if i_hrs < 10 else str(i_hrs)
          """ Calculate and format time since training started """
          now = time()
          elapsed_time = now - self.train_stats["timestamp"]
          try:
            i_hrs = int(elapsed_time // 3600)
            hrs = f"{i_hrs:02d}" if i_hrs < 10 else str(i_hrs)
            i_hrs = int(elapsed_time // 3600)
            hrs = f"{i_hrs:02d}" if i_hrs < 10 else str(i_hrs)
            i_hrs = int(elapsed_time // 3600)
            hrs = f"{i_hrs:02d}" if i_hrs < 10 else str(i_hrs)
              mins = f"{(int(elapsed_time % 3600) // 60):02d}"
              secs = f"{(int(elapsed_time % 3600) % 60):02d}"
          except ZeroDivisionError:
              hrs = "00"
              mins = "00"
keep keep keep keep replace replace replace keep keep keep keep keep
 bugfix: GUI force stdout/stderr reading to utf-8 
lib/gui/wrapper.py