add robust JSON handeling for auto annotation runner (#758)

main
Ben Hoff 6 years ago committed by Nikita Manovich
parent a18e83bafe
commit a18fb6d6ec

@ -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']

Loading…
Cancel
Save