diff --git a/PPOCRLabel/PPOCRLabel.py b/PPOCRLabel/PPOCRLabel.py index 523661b635ed4eaaf8d2b4ac05aaf60b2abc8541..c896425b25ef6647a58f46b1405d16e05e152e1f 100644 --- a/PPOCRLabel/PPOCRLabel.py +++ b/PPOCRLabel/PPOCRLabel.py @@ -1440,7 +1440,7 @@ class MainWindow(QMainWindow): if imgidx in self.PPlabel.keys(): for box in self.PPlabel[imgidx]: key_cls = None if not self.kie_mode else box['key_cls'] - shapes.append((box['transcription'], box['points'], None, key_cls, box['difficult'])) + shapes.append((box['transcription'], box['points'], None, key_cls, box.get('difficult', False))) self.loadLabels(shapes) self.canvas.verified = False