From f30fd24b2b2ee206c4d6a9b69f72aa8aeeed4d67 Mon Sep 17 00:00:00 2001 From: lorenzo Date: Mon, 1 Jul 2019 16:26:53 +0200 Subject: [PATCH] add exception for Nonetype --- src/predict/factory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/predict/factory.py b/src/predict/factory.py index f0d854e..74d013d 100644 --- a/src/predict/factory.py +++ b/src/predict/factory.py @@ -15,7 +15,7 @@ def factory_for_gt(im_size, name=None, path_gt=None): with open(path_gt, 'r') as f: dic_names = json.load(f) print('-' * 120 + "\nMonoloco: Ground-truth file opened") - except FileNotFoundError: + except (FileNotFoundError, TypeError): print('-' * 120 + "\nMonoloco: ground-truth file not found\n") dic_names = {}