From d128e8844d5d1bad238cd43d43730e50f8350199 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Mon, 6 Sep 2021 16:50:18 +0300 Subject: [PATCH] Add check for error reading --- image_classifier/image_classifier.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/image_classifier/image_classifier.py b/image_classifier/image_classifier.py index 97d55db..bc39a15 100755 --- a/image_classifier/image_classifier.py +++ b/image_classifier/image_classifier.py @@ -72,7 +72,8 @@ class image_classifier: exif_info = exif.Image(image_file) if exif_info.has_exif: for key in exif_info.list_all(): - print(f"{key}: {exif_info[key]}") + if key != 'cannot read a base/unknown IFD tag instance': + print(f"{key}: {exif_info[key]}") else: self._log.debug("No exif info in the image.") # get date