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

Download Error

Open BurnerDiamond opened this issue 5 years ago • 8 comments

I've not screwed around with anything and am just recently getting these new issues.

Traceback (most recent call last): File "C:\Users\Max\Downloads\Python\image_downloader.py", line 22, in <module> download = r.download(args) File "C:\Users\Max\AppData\Local\Programs\Python\Python38\lib\site-packages\google_images_download\google_images_download.py", line 838, in download paths, errors = self.download_executor(arguments) File "C:\Users\Max\AppData\Local\Programs\Python\Python38\lib\site-packages\google_images_download\google_images_download.py", line 965, in download_executor items,errorCount,abs_path = self._get_all_items(raw_html,main_directory,dir_name,limit,arguments) #get all image items and download images File "C:\Users\Max\AppData\Local\Programs\Python\Python38\lib\site-packages\google_images_download\google_images_download.py", line 768, in _get_all_items image_objects = self._get_image_objects(page) File "C:\Users\Max\AppData\Local\Programs\Python\Python38\lib\site-packages\google_images_download\google_images_download.py", line 758, in _get_image_objects image_objects = json.loads(object_decode)[31][0][12][2] File "C:\Users\Max\AppData\Local\Programs\Python\Python38\lib\json\__init__.py", line 357, in loads return _default_decoder.decode(s) File "C:\Users\Max\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\Max\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Not certain what is causing this issue.

BurnerDiamond avatar Mar 16 '20 13:03 BurnerDiamond

#298

doubleLLL3 avatar Mar 16 '20 14:03 doubleLLL3

#298

https://gyazo.com/53ddd38715bebe54b00e4a3fd05199b5

I've done it seem to still have the same error.

Wow Traceback (most recent call last): File "C:\Users\Max\Downloads\Python\image_downloader.py", line 22, in <module> download = r.download(args) File "C:\Users\Max\AppData\Local\Programs\Python\Python38\lib\site-packages\google_images_download\google_images_download.py", line 839, in download paths, errors = self.download_executor(arguments) File "C:\Users\Max\AppData\Local\Programs\Python\Python38\lib\site-packages\google_images_download\google_images_download.py", line 966, in download_executor items,errorCount,abs_path = self._get_all_items(raw_html,main_directory,dir_name,limit,arguments) #get all image items and download images File "C:\Users\Max\AppData\Local\Programs\Python\Python38\lib\site-packages\google_images_download\google_images_download.py", line 769, in _get_all_items image_objects = self._get_image_objects(page) File "C:\Users\Max\AppData\Local\Programs\Python\Python38\lib\site-packages\google_images_download\google_images_download.py", line 759, in _get_image_objects image_objects = json.loads(object_decode)[31][0][12][2] File "C:\Users\Max\AppData\Local\Programs\Python\Python38\lib\json\__init__.py", line 357, in loads return _default_decoder.decode(s) File "C:\Users\Max\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\Max\AppData\Local\Programs\Python\Python38\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

BurnerDiamond avatar Mar 16 '20 18:03 BurnerDiamond

I get this error Unfortunately all 100 could not be downloaded because some images were not downloadable. 0 is all we got for this search filter! How can I solve it?

bertainsikt avatar Mar 18 '20 13:03 bertainsikt

Unfortunately, i got the same error as you @bertainsikt . Any solutions found ? Would be great ! TiA.

Rookie00NOT7 avatar Apr 06 '20 17:04 Rookie00NOT7

Hi @Rookie00NOT7 , This alternative is working very well for me, it uses bing instead of google: https://github.com/ultralytics/google-images-download

bertainsikt avatar Apr 07 '20 07:04 bertainsikt

Try this alternative, works with Google, Bing, Baidu https://github.com/sczhengyabin/Image-Downloader

sczhengyabin avatar Apr 17 '20 01:04 sczhengyabin

@BurnerDiamond I have the same error as you. I did not change anything!

cdfrdmn avatar Apr 27 '20 20:04 cdfrdmn

See this quick and dirty fix, it solved the problem for me! I just erased the pre-existing code in the file google_images_download.py and substituted it with the provided code by the user

Nestak2 avatar May 04 '20 15:05 Nestak2