nameerror: name 'unicode' is not defined pycocotools
What are “named tuples” in Python? Python 3 replaced Alter line 308 of coco.py at pycocotools library directory, from:same here. Sorry for the trouble!
Same problem here, are you running python 3 by chance? Failed building wheel for pycocotools - Windows 10 conda hot 1 评估时报错:'Results do not correspond to current coco set' hot 1 x86_64-linux-gnu-gcc: error: pycocotools/_mask.c: No such file or directory hot 1 (Pretend name was assigned some value earlier.) (Pretend name was assigned some value earlier.) Related. The error, NameError: global name 'unicode' is not definedis a name error. TheLux83 changed the title NameError: name 'unicode NameError: name 'unicode' is not defined Jan 8, 2018. Would be great if it was.
Is development being done on python 3 with this plugin? Getting the class name of an instance? 191.
In that case, It seems to be because python 3 doesn't have the unicode type anymore as it's been replaced by/incorperated into the 'str' type. 145. Pycocotools does not seem to be Python 3 compatible.In a quick search I found that there's at least 5 PRs that should solve this issue.Is there a new direction by the authors to refer python3 compatibility issues to a different source? Eval went fine until prepping results...`I0408 02:57:12.755542 140562127026048 evaluation.py:167] Evaluation [5000/5000]File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/script_ops.py", line 243, in File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/autograph/impl/api.py", line 309, in wrapperFile "/content/automl/efficientdet/coco_metric.py", line 135, in _evaluateFile "/usr/local/lib/python3.6/dist-packages/pycocotools/coco.py", line 308, in loadResFile "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/script_ops.py", line 243, in File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/autograph/impl/api.py", line 309, in wrapperFile "/content/automl/efficientdet/coco_metric.py", line 135, in _evaluateFile "/usr/local/lib/python3.6/dist-packages/pycocotools/coco.py", line 308, in loadRes(1) Unknown: NameError: name 'unicode' is not definedFile "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/script_ops.py", line 243, in File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/autograph/impl/api.py", line 309, in wrapperFile "/content/automl/efficientdet/coco_metric.py", line 135, in _evaluateFile "/usr/local/lib/python3.6/dist-packages/pycocotools/coco.py", line 308, in loadResDuring handling of the above exception, another exception occurred:File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/script_ops.py", line 243, in File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/autograph/impl/api.py", line 309, in wrapperFile "/content/automl/efficientdet/coco_metric.py", line 135, in _evaluateFile "/usr/local/lib/python3.6/dist-packages/pycocotools/coco.py", line 308, in loadRes(1) Unknown: NameError: name 'unicode' is not definedFile "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/script_ops.py", line 243, in File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/autograph/impl/api.py", line 309, in wrapperFile "/content/automl/efficientdet/coco_metric.py", line 135, in _evaluateFile "/usr/local/lib/python3.6/dist-packages/pycocotools/coco.py", line 308, in loadResFile "/usr/local/lib/python3.6/dist-packages/pycocotools/coco.py", line 308, in loadResSuccessfully merging a pull request may close this issue. 4 comments Comments. The python3 and above replaced the ‘unicode’ type with ‘str’ and the old ‘str’ type has been replaced by the type ‘bytes’. I am editing the script with the new keywords and type alongside I recommend you to read the documentation first.