ejlb / google-open-image-download

A parallel download util for Google's open image dataset

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No row.iteritems()

msroth opened this issue · comments

Thanks for the fix; I see what you did with the UTF-8 chars. However, the new code gives me the following error: AttributeError: 'dict' object has no attribute 'iteritems'. See details below.

python download.py --timeout 10 --sub-dirs 100 --min-dim -1 "S:\Google OpenImages\images_2016_08\train\images.csv" "S:\Google OpenImages\images_2016_08\train\images"

8044 @ 2016-10-06 09:11:05,259 (266) download - DEBUG - Namespace(consumers=5, force=False, input='S:\Google OpenImages\images_2016_08\train\images.csv', min_dim=-1, output='S:\Google OpenImages\images_2016_08\train\images', queue_size=1000, sub_dirs=100, timeout=10.0)
Process Process-1:
Traceback (most recent call last):
File "C:\Python35\lib\multiprocessing\process.py", line 249, in _bootstrap
self.run()
File "C:\Python35\lib\multiprocessing\process.py", line 93, in run
self._target(_self._args, *_self._kwargs)
File "S:\Google OpenImages\download\download.py", line 145, in producer
for row in unicode_dict_reader(f):
File "S:\Google OpenImages\download\download.py", line 58, in unicode_dict_reader
yield {key: unicode(value, 'utf-8') for key, value in row.iteritems()}
AttributeError: 'dict' object has no attribute 'iteritems'

@msroth sorry about that is was a py2 / py3 issue. Should be fixed now.

I'm planning to add some tests to stop this from happening.

@msroth found another problem with py3,

Thanks for your effort. Let me know when the fixes are in and I’ll be happy to try it again.

Cheers,
Scott Roth
[Armedia_blue_small]
Test & Evaluation Lead
Science and Technology Integration Lab (STIL)
2070 Chain Bridge Dr., #100
Vienna, VA 22182
scott.roth@armedia.com
Cell: 703-408-1187
Office: 571-395-8875

From: Eddie Bell [mailto:notifications@github.com]
Sent: Thursday, October 06, 2016 9:46 AM
To: ejlb/google-open-image-download google-open-image-download@noreply.github.com
Cc: Scott Roth scott.roth@armedia.com; Mention mention@noreply.github.com
Subject: Re: [ejlb/google-open-image-download] No row.iteritems() (#3)

@msrothhttps://github.com/msroth found another problem with py3,


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//issues/3#issuecomment-251965582, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AD3HHk0OBtuORE8uo3w340VXkhaE9CIcks5qxPuIgaJpZM4KP7dK.

@msroth thanks for testing. It now works with python 2 and python 3 on my local machine. But I have not tried it with windows.

Seems to be working! Thanks for your help.

Cheers,
Scott Roth
[Armedia_blue_small]
Test & Evaluation Lead
Science and Technology Integration Lab (STIL)
2070 Chain Bridge Dr., #100
Vienna, VA 22182
scott.roth@armedia.com
Cell: 703-408-1187
Office: 571-395-8875

From: Eddie Bell [mailto:notifications@github.com]
Sent: Thursday, October 06, 2016 9:59 AM
To: ejlb/google-open-image-download google-open-image-download@noreply.github.com
Cc: Scott Roth scott.roth@armedia.com; Mention mention@noreply.github.com
Subject: Re: [ejlb/google-open-image-download] No row.iteritems() (#3)

@msrothhttps://github.com/msroth thanks for testing. It now works with python 2 and python 3 on my local machine. But I have not tried it with windows.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//issues/3#issuecomment-251969120, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AD3HHhoEAojffue6Va3MovcLnAz1ksq1ks5qxP6IgaJpZM4KP7dK.

great! Let me know if you have any other problems