Przeglądaj źródła

Fix attribute error of _getexif

Kentaro Wada 6 lat temu
rodzic
commit
3cc4199bbf
1 zmienionych plików z 5 dodań i 1 usunięć
  1. 5 1
      labelme/app.py

+ 5 - 1
labelme/app.py

@@ -1563,7 +1563,11 @@ class MainWindow(QtWidgets.QMainWindow, WindowMixin):
 
 
 def apply_exif_orientation(image):
-    exif = image._getexif()
+    try:
+        exif = image._getexif()
+    except AttributeError:
+        exif = None
+
     if exif is None:
         return image