google-images-download icon indicating copy to clipboard operation
google-images-download copied to clipboard

Error when getting related images (KeyError: 'ity')

Open thijsbs opened this issue 5 years ago • 3 comments

Hi, great tool. I just wanted to share this traceback that I encountered:


Completed Image Thumbnail ====> 500_F_271828072_OCQ5f55rK6kfryfR2RD2hYo56XaPZQvn.jpg
Image URL: https://st2.depositphotos.com/1902695/11244/i/950/depositphotos_112442314-stock-photo-blue-triggerfish-in-maldives-blue.jpg
Skipping image download...
Image URL: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRpCUAhowhg5w67JkO5rgjFB09UOlA8PDhL8ineVHhXle1aXNFq0g
Completed Image Thumbnail ====> depositphotos_112442314-stock-photo-blue-triggerfish-in-maldives-blue.jpg

Now Downloading - underwater landscape - ; background-color
Getting you a lot of images. This may take a few moments...
Reached end of Page.
Traceback (most recent call last):
  File "/usr/local/bin/googleimagesdownload", line 11, in <module>
    load_entry_point('google-images-download==2.8.0', 'console_scripts', 'googleimagesdownload')()
  File "/usr/local/lib/python3.7/dist-packages/google_images_download/google_images_download.py", line 998, in main
    paths,errors = response.download(arguments)  #wrapping response in a variable just for consistency
  File "/usr/local/lib/python3.7/dist-packages/google_images_download/google_images_download.py", line 825, in download
    paths, errors = self.download_executor(arguments)
  File "/usr/local/lib/python3.7/dist-packages/google_images_download/google_images_download.py", line 978, in download_executor
    self._get_all_items(new_raw_html, main_directory, search_term + " - " + key, limit,arguments)
  File "/usr/local/lib/python3.7/dist-packages/google_images_download/google_images_download.py", line 760, in _get_all_items
    object = self.format_object(object)
  File "/usr/local/lib/python3.7/dist-packages/google_images_download/google_images_download.py", line 275, in format_object
    formatted_object['image_format'] = object['ity']
KeyError: 'ity'

thijsbs avatar Sep 15 '19 23:09 thijsbs

What is the command you sent? It will help to debug and try to understand the issue.

davidstrouk avatar Sep 23 '19 21:09 davidstrouk

I believe it was:

googleimagesdownload -k 'underwater landscape' -l 600 -ri -tho -o ~/somefolder/ -cd chromedriver

thijsbs avatar Sep 23 '19 21:09 thijsbs

This is what the object looks like for me on some of the messages. object {'th': 1200, 'tw': 1200}

hollowgalaxy avatar Oct 19 '19 23:10 hollowgalaxy