              name = name[name.rfind("_") + 1:].title()
              try:
                  logger.debug("Displaying preview: '%s'", img)
                  size = self._get_current_size(name)
                  if not size:
                      return
                  self._previewtrain[name] = [Image.open(img), None, modified]
                  self.resize_image(name, size)
                  self._errcount = 0
              except ValueError:
                  # This is probably an error reading the file whilst it's
 
</s> remove         frame_dims: tuple
            The (width (`int`), height (`int`)) of the display panel that will display the preview
 </s> add         frame_dims: tuple, optional
            The (width (`int`), height (`int`)) of the display panel that will display the preview.
            ``None`` if the frame dimensions are not known. </s> remove     def resize_image(self, name: str, frame_dims: Tuple[int, int]):
 </s> add     def resize_image(self, name: str, frame_dims: Optional[Tuple[int, int]]) -> None:
              name = name[name.rfind("_") + 1:].title()
              try:
                  logger.debug("Displaying preview: '%s'", img)
                  size = self._get_current_size(name)


                  self._previewtrain[name] = [Image.open(img), None, modified]
                  self.resize_image(name, size)
                  self._errcount = 0
              except ValueError:
                  # This is probably an error reading the file whilst it's
keep keep keep keep replace replace keep keep keep keep keep
 Bugfix: Display preview image in gui 
lib/gui/utils.py