Skip to content

Commit

Permalink
Fix dumb bug and log exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
derneuere committed Jul 10, 2023
1 parent dcda076 commit ac7f842
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/models/photo.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,12 +684,13 @@ def _extract_faces(self, second_try=False):
# Create
try:
face_locations = face_recognition.face_locations(
image, model=self.owner.face_detection_model.lower()
image, model=self.owner.face_recognition_model.lower()
)
except Exception:
except Exception as e:
logger.info(
f"Can't extract face information on photo: {self.main_file.path}"
)
logger.info(e)

if len(face_locations) > 0:
face_encodings = face_recognition.face_encodings(
Expand Down

0 comments on commit ac7f842

Please sign in to comment.