      def read_stdout(self):
          """ Read stdout from the subprocess. If training, pass the loss
          values to Queue """
          while True:
              output = self.process.stdout.readline()
              if output == "" and self.process.poll() is not None:
                  break
              if output:
                  if (self.command == "train" and self.capture_loss(output)) or (
                          self.command != "train" and self.capture_tqdm(output)):
 
</s> remove             output = self.process.stderr.readline()
 </s> add             try:
                output = self.process.stderr.readline()
            except ValueError as err:
                if str(err).lower().startswith("i/o operation on closed file"):
                    break
                raise </s> remove         self.process = Popen(args, **kwargs)
 </s> add         self.process = Popen(args, **kwargs, stdin=PIPE) </s> remove         if self.command == "train":
 </s> add         if self.command != "train": </s> remove                 while True:
                    timeelapsed = time() - now
                    if self.process.poll() is not None:
                        break
                    if timeelapsed > 30:
                        raise ValueError("Timeout reached sending Exit Signal")
 </s> add                     while True:
                        timeelapsed = time() - now
                        if self.process.poll() is not None:
                            break
                        if timeelapsed > 60:
                            raise ValueError("Timeout reached sending Exit Signal") </s> remove                     os.kill(
                        self.process.pid,
                        signal.CTRL_BREAK_EVENT)  # pylint: disable=no-member
 </s> add                     try:
                        self.process.communicate(input="\n", timeout=60)
                    except TimeoutExpired:
                        raise ValueError("Timeout reached sending Exit Signal")
            try:
                output = self.process.stdout.readline()
            except ValueError as err:
                if str(err).lower().startswith("i/o operation on closed file"):
                    break
                raise
      def read_stdout(self):
          """ Read stdout from the subprocess. If training, pass the loss
          values to Queue """
          while True:
            try:
                output = self.process.stdout.readline()
            except ValueError as err:
                if str(err).lower().startswith("i/o operation on closed file"):
                    break
                raise
              if output == "" and self.process.poll() is not None:
                  break
              if output:
                  if (self.command == "train" and self.capture_loss(output)) or (
                          self.command != "train" and self.capture_tqdm(output)):
keep keep keep keep replace keep keep keep keep keep
 GUI Bugfix: Crash on training termination (Windows) 
lib/gui/wrapper.py