diff --git a/labelImg.py b/labelImg.py index 8515509d..8e83a2fe 100755 --- a/labelImg.py +++ b/labelImg.py @@ -1190,7 +1190,10 @@ class MainWindow(QMainWindow, WindowMixin): # If the labelling file does not exist yet, create if and # re-save it with the verified attribute. self.saveFile() - self.labelFile.toggleVerify() + if self.labelFile != None: + self.labelFile.toggleVerify() + else: + return self.canvas.verified = self.labelFile.verified self.paintCanvas() diff --git a/libs/constants.py b/libs/constants.py old mode 100644 new mode 100755 index fc749aa5..7e12d682 --- a/libs/constants.py +++ b/libs/constants.py @@ -12,5 +12,5 @@ SETTING_PAINT_LABEL = 'paintlabel' SETTING_LAST_OPEN_DIR = 'lastOpenDir' SETTING_AUTO_SAVE = 'autosave' SETTING_SINGLE_CLASS = 'singleclass' -FORMAT_PASCALVOC='PscalVOC' -FORMAT_YOLO='YOLO' \ No newline at end of file +FORMAT_PASCALVOC='PascalVOC' +FORMAT_YOLO='YOLO'