              if self._target:
                  retval = self._target(*self._args, **self._kwargs)
                  self._queue.put(retval)
          except Exception:  # pylint: disable=broad-except
              self.err = sys.exc_info()
              logger.debug("Error in thread (%s): %s", self._name,
                           self.err[1].with_traceback(self.err[2]))
          finally:
              self._complete.set()
              # Avoid a ref-cycle if the thread is running a function with
 
</s> remove     def get_result(self):
 </s> add     def get_result(self) -> Any: </s> remove     def run(self):
 </s> add     def run(self) -> None: </s> remove         self._queue = Queue()
 </s> add         self._queue: Queue = Queue() </s> remove     def complete(self):
 </s> add     def complete(self) -> Event: </s> remove     def previewoutput(self):
 </s> add     def previewoutput(self) -> Optional[Tuple[Image.Image, ImageTk.PhotoImage]]:
            self.err = cast(Tuple[Type[BaseException], BaseException, "TracebackType"],
                            sys.exc_info())
            assert self.err is not None
              if self._target:
                  retval = self._target(*self._args, **self._kwargs)
                  self._queue.put(retval)
          except Exception:  # pylint: disable=broad-except
            self.err = cast(Tuple[Type[BaseException], BaseException, "TracebackType"],
                            sys.exc_info())
            assert self.err is not None
              logger.debug("Error in thread (%s): %s", self._name,
                           self.err[1].with_traceback(self.err[2]))
          finally:
              self._complete.set()
              # Avoid a ref-cycle if the thread is running a function with
keep keep keep keep replace keep keep keep keep keep
 Bugfix: Preview for extract in batch mode 
lib/gui/utils.py