diff --git a/utils/auto_annotation/run_model.py b/utils/auto_annotation/run_model.py index 8aedf1c5cfca9dbb38f6177d6b1b78a01ddaa928..d45ce594af4cdea6ca3c10896c51bca0e90ccdff 100644 --- a/utils/auto_annotation/run_model.py +++ b/utils/auto_annotation/run_model.py @@ -70,7 +70,11 @@ def main(): return with open(mapping_file) as json_file: - mapping = json.load(json_file) + try: + mapping = json.load(json_file) + except json.decoder.JSONDecodeError: + logging.critical('JSON file not able to be parsed! Check file') + return try: mapping = mapping['label_map']