From e125b2a21756fc42d673f70e3df6fdeec7ea4edf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Thu, 12 May 2016 17:39:49 +0200 Subject: [PATCH] geolocate: don't fail on images without EXIF data (#10905) --- wcs/wf/geolocate.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcs/wf/geolocate.py b/wcs/wf/geolocate.py index c81f3c3..1f9bc80 100644 --- a/wcs/wf/geolocate.py +++ b/wcs/wf/geolocate.py @@ -156,7 +156,12 @@ class GeolocateWorkflowStatusItem(WorkflowStatusItem): get_logger().error('error geolocating from photo, invalid file') return - exif_data = image._getexif() + try: + exif_data = image._getexif() + except AttributeError: + get_logger().error('error geolocating from photo, failed to get EXIF data') + return + if exif_data: gps_info = exif_data.get(0x8825) if gps_info: -- 2.8.1