Skip to content

Commit 5a1816d

Browse files
fix: added default value for info (#32)
1 parent 0eb9fa8 commit 5a1816d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PythonAPI/pycocotools/coco.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def loadRes(self, resFile):
311311
:return: res (obj) : result api object
312312
"""
313313
res = COCO()
314-
res.dataset['info'] = copy.deepcopy(self.dataset['info'])
314+
res.dataset['info'] = copy.deepcopy(self.dataset.get('info', {}))
315315
res.dataset['images'] = [img for img in self.dataset['images']]
316316

317317
print('Loading and preparing results...')

0 commit comments

Comments
 (0)