From c12f007f45f042a618e635b4823c0801a9753a5a Mon Sep 17 00:00:00 2001 From: Elvis Dowson Date: Sat, 13 Jun 2020 20:15:10 +0400 Subject: [PATCH] objectDetection: data.py: Fix '_csv.reader' object has no attribute 'next' error. For Python 3.x, we have to use next(reader) instead of reader.next() Signed-off-by: Elvis Dowson --- digits/extensions/data/objectDetection/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/digits/extensions/data/objectDetection/data.py b/digits/extensions/data/objectDetection/data.py index 31cdc1859..0ece800af 100644 --- a/digits/extensions/data/objectDetection/data.py +++ b/digits/extensions/data/objectDetection/data.py @@ -35,7 +35,7 @@ def __init__(self, **kwargs): s = StringIO.StringIO(self.custom_classes) reader = csv.reader(s) self.class_mappings = {} - for idx, name in enumerate(reader.next()): + for idx, name in enumerate(next(reader)): self.class_mappings[name.strip().lower()] = idx else: self.class_mappings = None