  
  
  def hash_image_file(filename):
      """ Return an image file's sha1 hash """
      logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
      img = cv2_read_img(filename, raise_error=True)
      img_hash = sha1(img).hexdigest()
      logger.trace("filename: '%s', hash: %s", filename, img_hash)
      return img_hash
  
 
</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         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 </s> remove     logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
 </s> add     logger = logging.getLogger(__name__)  # pylint:disable=invalid-name </s> remove     logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
 </s> add     logger = logging.getLogger(__name__)  # pylint:disable=invalid-name </s> remove     logger = logging.getLogger(__name__)  # pylint: disable=invalid-name
 </s> add     logger = logging.getLogger(__name__)  # pylint:disable=invalid-name
    logger = logging.getLogger(__name__)  # pylint:disable=invalid-name
  
  
  def hash_image_file(filename):
      """ Return an image file's sha1 hash """
    logger = logging.getLogger(__name__)  # pylint:disable=invalid-name
      img = cv2_read_img(filename, raise_error=True)
      img_hash = sha1(img).hexdigest()
      logger.trace("filename: '%s', hash: %s", filename, img_hash)
      return img_hash
  
keep keep keep keep replace keep keep keep keep keep
 FaceswapError Exception. Added to cli and utils 
lib/utils.py