add exception for Nonetype

This commit is contained in:
lorenzo 2019-07-01 16:26:53 +02:00
parent b0c3f51897
commit f30fd24b2b

View File

@ -15,7 +15,7 @@ def factory_for_gt(im_size, name=None, path_gt=None):
with open(path_gt, 'r') as f: with open(path_gt, 'r') as f:
dic_names = json.load(f) dic_names = json.load(f)
print('-' * 120 + "\nMonoloco: Ground-truth file opened") print('-' * 120 + "\nMonoloco: Ground-truth file opened")
except FileNotFoundError: except (FileNotFoundError, TypeError):
print('-' * 120 + "\nMonoloco: ground-truth file not found\n") print('-' * 120 + "\nMonoloco: ground-truth file not found\n")
dic_names = {} dic_names = {}