title: AttributeError: 'NoneType' object has no attribute 'predict'
body: <pre><code>#creating recognizer
  recognizer= cv2.face_LBPHFaceRecognizer()
  ....
  #predicting sad images
  image_paths = [os.path.join(path, f) for f in os.listdir(path) if f.endswith('.sad')]
  for image_path in image_paths:
      predict_image_pil = Image.open(image_path).convert('L')
      predict_image = np.array(predict_image_pil, 'uint8')
      faces = faceCascade.detectMultiScale(predict_image)
      for (x, y, w, h) in faces:
          nbr_predicted, conf = recognizer.predict(predict_image[y: y + h, x: x + w])
  ....
  </code></pre>
  
  <p>Getting error that</p>
  
  <blockquote>
    <p>nbr_predicted, conf = recognizer.predict(predict_image[y: y + h, x: x + w])
    AttributeError: 'NoneType' object has no attribute 'predict'</p>
  </blockquote>
  
  <p>How to dissolve this error as face_PredictCollector() is also not working</p>