      logger.trace("Requested image: '%s'", filename)
      success = True
      image = None
      try:
          image = cv2.imread(filename)  # pylint: disable=no-member
          if image is None:
              raise ValueError
      except TypeError:
          success = False
          msg = "Error while reading image (TypeError): '{}'".format(filename)
 
</s> remove     logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
 </s> add     logger = logging.getLogger(__name__)  # pylint:disable=invalid-name </s> remove     except Exception as err:  # pylint: disable=broad-except
 </s> add     except Exception as err:  # pylint:disable=broad-except </s> remove     img = cv2.imencode(extension, image)[1]  # pylint: disable=no-member
 </s> add     img = cv2.imencode(extension, image)[1]  # pylint:disable=no-member,c-extension-no-member </s> remove     logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
 </s> add     logger = logging.getLogger(__name__)  # pylint:disable=invalid-name </s> remove         cv2.imdecode(img, cv2.IMREAD_UNCHANGED)).hexdigest()  # pylint: disable=no-member
 </s> add         cv2.imdecode(  # pylint:disable=no-member,c-extension-no-member
            img,
            cv2.IMREAD_UNCHANGED)).hexdigest()  # pylint:disable=no-member,c-extension-no-member
        image = cv2.imread(filename)  # pylint:disable=no-member,c-extension-no-member
      logger.trace("Requested image: '%s'", filename)
      success = True
      image = None
      try:
        image = cv2.imread(filename)  # pylint:disable=no-member,c-extension-no-member
          if image is None:
              raise ValueError
      except TypeError:
          success = False
          msg = "Error while reading image (TypeError): '{}'".format(filename)
keep keep keep keep replace keep keep keep keep keep
 FaceswapError Exception. Added to cli and utils 
lib/utils.py