fixed run_path_pairs AttributeError #5937

Closed
wants to merge 1 commit into
from

Projects

None yet

6 participants

@drcege
drcege commented Nov 29, 2016

In python3, dict.items() is a little different.

D.items() -> a set-like object providing a view on D's items

Otherwise, AttributeError: 'dict_items' object has no attribute 'append' will be raised.

@drcege drcege fixed run_path_pairs AttributeError
In python3,  `dict.items()` is a little different.
```
D.items() -> a set-like object providing a view on D's items
```
Otherwise, `AttributeError: 'dict_items' object has no attribute 'append'` will be raised.
418b1bd
@tensorflow-jenkins
Collaborator

Can one of the admins verify this patch?

@googlebot googlebot added the cla: yes label Nov 29, 2016
@@ -136,7 +136,7 @@ def get_plugin_handlers(self, run_paths, logdir):
@property
def configs(self):
"""Returns a map of run paths to `ProjectorConfig` protos."""
- run_path_pairs = self.run_paths.items()
+ run_path_pairs = list(self.run_paths.items())
@mrry
mrry Nov 29, 2016 Contributor

Instead of converting to a list here, it might be more readable to remove the use of list.append() and replace L143 with:

      run_path_pairs = [('.', self.logdir)]
@mrry mrry self-assigned this Nov 29, 2016
@martinwicke
Member

ping?

@mrry
Contributor
mrry commented Dec 16, 2016

Looks like this fix has already been applied in 0cbf1f0, so we can close this PR.

@mrry mrry closed this Dec 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment