google-images-download
google-images-download copied to clipboard
if Could not open URL. Please check your internet connection and/or ssl settings
Evaluating...
Could not open URL. Please check your internet connection and/or ssl settings
Starting Download...
Traceback (most recent call last):
File "google_images_download.py", line 913, in
the error is cause by ssl. you just need to add the context = ssl._create_unverified_context() resp = urllib.request.urlopen(req,context=context)
Had same issue running in python 3.6. Tried in python 2.7 and it worked perfectly.
@liciciyi What python version are you on? Does this happen consistently or intermittently? Also are you behind a proxy?
@hardikvasa same error. happens consistently. not usable. no proxy.
@hardikvasa I am having this error as well on Python 2.7, 3.7, and 3.8: At first my program will download images, and then after a while I start getting the error. If I restart my program, the error immediately persists. Restarting doesn't stop the error. After some time, a few hours, I try again and I am back to being able to download for a little bit.
Same issue here - probably due to Google restrictions don't you think ? I have a delay of 0.5 seconds It worked for the 800 first searches and now it blocks almost immediately
I have same problom, The exception is google_images_download.py 142 line. Is the google Anti-reptile problem?
I get this exception on select images. I'm wondering if the fact that the header says User-Agent is "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36" that causes the problem.
Hi all, I had the same error message. Here are some insights that might help you:
- In order to debug, change google_images_download.py as follows:
replace
req = urllib.request.Request(url, headers=headers)
resp = urllib.request.urlopen(req) #original
respData = str(resp.read())
with
context = ssl._create_unverified_context()
req = urllib.request.Request(url, headers=headers)
resp = urllib.request.urlopen(req,context=context)
respData = str(resp.read())
This doesn't solved the problem but gave me some more information.
- However what really solved this problem on my side was to uninstall Inkscape. The problem was that there was another version of Python installed under the Inkscape directory, and apparently it overwrote the path variable so every time I executed
python, it would execute the one that was installed by Inkscape. So perhaps you could check if the correct version of Python gets executed.
which python