Do you know how to fix this error?
I was hoping to download 50k images but only 7000 images got downloaded.
[!!]Indexing page: 56
Traceback (most recent call last):
File "/home/mona/anaconda3/lib/python3.7/urllib/request.py", line 1319, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/home/mona/anaconda3/lib/python3.7/http/client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/home/mona/anaconda3/lib/python3.7/http/client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/home/mona/anaconda3/lib/python3.7/http/client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/home/mona/anaconda3/lib/python3.7/http/client.py", line 1026, in _send_output
self.send(msg)
File "/home/mona/anaconda3/lib/python3.7/http/client.py", line 966, in send
self.connect()
File "/home/mona/anaconda3/lib/python3.7/http/client.py", line 1414, in connect
super().connect()
File "/home/mona/anaconda3/lib/python3.7/http/client.py", line 938, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/home/mona/anaconda3/lib/python3.7/socket.py", line 707, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/home/mona/anaconda3/lib/python3.7/socket.py", line 752, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "download_images_from_bing.py", line 2, in <module>
downloader.download('gun', limit=50000, adult_filter_off=True, force_replace=False)
File "/home/mona/anaconda3/lib/python3.7/site-packages/bing_image_downloader/downloader.py", line 34, in download
Bing().bing(query, limit, adult)
File "/home/mona/anaconda3/lib/python3.7/site-packages/bing_image_downloader/bing.py", line 63, in bing
response = urllib.request.urlopen(request)
File "/home/mona/anaconda3/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/home/mona/anaconda3/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/home/mona/anaconda3/lib/python3.7/urllib/request.py", line 543, in _open
'_open', req)
File "/home/mona/anaconda3/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/home/mona/anaconda3/lib/python3.7/urllib/request.py", line 1362, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/home/mona/anaconda3/lib/python3.7/urllib/request.py", line 1321, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
from bing_image_downloader import downloader
downloader.download('cat', limit=50000, adult_filter_off=True, force_replace=False)