tensorflow / models

Models and examples built with TensorFlow
Other
77.22k stars 45.75k forks source link

Mention of Python 3: AttributeError: 'dict' object has no attribute 'iteritems' for "python ./object_detection/builders/model_builder_test.py" #1587

Closed zhouphd closed 7 years ago

zhouphd commented 7 years ago

When you meet this:

File "./object_detection/builders/model_builder_test.py", line 258, in test_create_faster_rcnn_resnet_v1_models_from_config

File "./object_detection/builders/model_builder_test.py", line 448, in test_create_rfcn_resnet_v1_model_from_config

This is a Python 2 to Python 3 of dict change.

Solution: change iteritems() to items()

for extractor_type, extractor_class in FEATURE_EXTRACTOR_MAPS.items():

Then, python ./object_detection/builders/model_builder_test.py

.......

Ran 7 tests in 0.055s

OK

aselle commented 7 years ago

@zhouphd, thanks for finding this. Could you prepare a pull request, please?

nealwu commented 7 years ago

@justanhduc submitted a pull request at https://github.com/tensorflow/models/pull/1571/files.

zhouphd commented 7 years ago

@aselle I’d like to, it seems a common issue, a pull request more like: moving python 2 to python 3, just mention user who meet this, I 'll keep watching & following, :)

@nealwu @justanhduc Thanks for you all, I was sleeping in the midnight, ~~

From #1571 , I think we could close this, :)

Best,