Explorar el Código

Fix attribute error of _getexif

Kentaro Wada hace 6 años
padre
commit
3cc4199bbf
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  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