소스 검색

Fix attribute error of _getexif

Kentaro Wada 6 년 전
부모
커밋
3cc4199bbf
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  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