diff --git a/ghunt/parsers/vision.py b/ghunt/parsers/vision.py index 24c916cd..2089bc44 100644 --- a/ghunt/parsers/vision.py +++ b/ghunt/parsers/vision.py @@ -88,7 +88,10 @@ def __init__(self): self.face_annotations: List[VisionFaceAnnotation] = [] def _scrape(self, vision_data: Dict[str, any]): - for face_data in vision_data["faceAnnotations"]: - face_annotation = VisionFaceAnnotation() - face_annotation._scrape(face_data) - self.face_annotations.append(face_annotation) \ No newline at end of file + if 'faceAnnotations' in vision_data: + for face_data in vision_data["faceAnnotations"]: + face_annotation = VisionFaceAnnotation() + face_annotation._scrape(face_data) + self.face_annotations.append(face_annotation) + else: + print("No face annotations found in the vision data.")