http.client error when downloading certain images
See original GitHub issueHello,
I am using your script to download some images and have the following error that blocks the downloads at a certain image:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/http/client.py", line 546, in _get_chunk_left
chunk_left = self._read_next_chunk_size()
File "/usr/local/lib/python3.6/http/client.py", line 513, in _read_next_chunk_size
return int(line, 16)
ValueError: invalid literal for int() with base 16: b''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/http/client.py", line 563, in _readall_chunked
chunk_left = self._get_chunk_left()
File "/usr/local/lib/python3.6/http/client.py", line 548, in _get_chunk_left
raise IncompleteRead(b'')
http.client.IncompleteRead: IncompleteRead(0 bytes read)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/googleimagesdownload", line 11, in <module>
load_entry_point('google-images-download==2.0.4', 'console_scripts', 'googleimagesdownload')()
File "/usr/local/lib/python3.6/site-packages/google_images_download-2.0.4-py3.6.egg/google_images_download/google_images_download.py", line 784, in main
File "/usr/local/lib/python3.6/site-packages/google_images_download-2.0.4-py3.6.egg/google_images_download/google_images_download.py", line 742, in download
File "/usr/local/lib/python3.6/site-packages/google_images_download-2.0.4-py3.6.egg/google_images_download/google_images_download.py", line 631, in _get_all_items
File "/usr/local/lib/python3.6/site-packages/google_images_download-2.0.4-py3.6.egg/google_images_download/google_images_download.py", line 540, in download_image
File "/usr/local/lib/python3.6/http/client.py", line 456, in read
return self._readall_chunked()
File "/usr/local/lib/python3.6/http/client.py", line 570, in _readall_chunked
raise IncompleteRead(b''.join(value))
http.client.IncompleteRead: IncompleteRead(87522 bytes read)
Also, thanks for sharing this awesome tool!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top Results From Across the Web
c# - How do I use the new HttpClient from Windows.Web.Http ...
Http.HttpClient how can I download an image? I would like use this HttpClient because it is available to use in portable class libraries....
Read more >Fix file download errors - Google Chrome Help
This error means that there's not enough space on your computer to download the file. To fix the error: Delete some files from...
Read more >3. HTTP Status Codes and Errors - HttpWatch
The images that fail to download can be found by looking at the value in the Result column. If the value is too...
Read more >downloading images from URL - Oracle Communities
Hi All, I am trying to write code to download images from given URL. My application will take URLs by querying sql server,...
Read more >How to Fix a 400 Bad Request Error (Causes and Fixes) - Kinsta
The HTTP error 400 can occur due to incorrectly typed URL, malformed syntax, or a URL that contains illegal characters. This is surprisingly ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Folks, although i could not reproduce this issue on my end, I have added some exception handling to avoid it throwing an unhandled exception.
Do let me know if this resolves the issue.
same here