From 7b5a43fce10b52601854086f43cd892e49c67dc9 Mon Sep 17 00:00:00 2001 From: Number1Tao Date: Fri, 16 Dec 2016 22:34:40 +0800 Subject: [PATCH] Fix a bug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit when run :./labelImg.py Error: File "./labelImg.py", line 815 extensions = {'.jpeg','.jpg', '.png', '.bmp'} Fix: change {'.jpeg','.jpg', '.png', '.bmp'} to ['.jpeg','.jpg', '.png', '.bmp'] Environment:python=2.6.9 qt=4.11.3 OX=mac os --- labelImg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/labelImg.py b/labelImg.py index 8409dabe..a4d37f65 100755 --- a/labelImg.py +++ b/labelImg.py @@ -812,7 +812,7 @@ class MainWindow(QMainWindow, WindowMixin): self.loadFile(filename) def scanAllImages(self, folderPath): - extensions = {'.jpeg','.jpg', '.png', '.bmp'} + extensions = ['.jpeg','.jpg', '.png', '.bmp'] images = [] for root, dirs, files in os.walk(folderPath):