                    "stderr": PIPE,
                    "bufsize": 1,
                    "universal_newlines": True}
  
          self.process = Popen(args, **kwargs)
          self.thread_stdout()
          self.thread_stderr()
  
      def read_stdout(self):
          """ Read stdout from the subprocess. If training, pass the loss
 
</s> remove             output = self.process.stdout.readline()
 </s> add             try:
                output = self.process.stdout.readline()
            except ValueError as err:
                if str(err).lower().startswith("i/o operation on closed file"):
                    break
                raise </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 from subprocess import PIPE, Popen
 </s> add from subprocess import PIPE, Popen, TimeoutExpired </s> remove         if self.command == "train":
 </s> add         if self.command != "train": </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")
        self.process = Popen(args, **kwargs, stdin=PIPE)
                    "stderr": PIPE,
                    "bufsize": 1,
                    "universal_newlines": True}
  
        self.process = Popen(args, **kwargs, stdin=PIPE)
          self.thread_stdout()
          self.thread_stderr()
  
      def read_stdout(self):
          """ Read stdout from the subprocess. If training, pass the loss
keep keep keep keep replace keep keep keep keep keep
 GUI Bugfix: Crash on training termination (Windows) 
lib/gui/wrapper.py