Skip to content

Commit

Permalink
Merge pull request #280 from Johnqczhang/master
Browse files Browse the repository at this point in the history
fix unicode error in python3
  • Loading branch information
pdollar authored Aug 2, 2019
2 parents aca78bc + f67e873 commit 636becd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PythonAPI/pycocotools/coco.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def loadRes(self, resFile):

print('Loading and preparing results...')
tic = time.time()
if type(resFile) == str or type(resFile) == unicode:
if type(resFile) == str or (PYTHON_VERSION == 2 and type(resFile) == unicode):
anns = json.load(open(resFile))
elif type(resFile) == np.ndarray:
anns = self.loadNumpyAnnotations(resFile)
Expand Down

0 comments on commit 636becd

Please sign in to comment.