You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting this error right after I execute the script, here's the try except that generates the error:
try:
logger.info("Crawling %s" % url)
request = urllib2.urlopen(req)
except urllib2.URLError, e:
logger.error("Exception at url: %s\n%s" % (url, e))
any idea what might be wrong? Thanks.
The text was updated successfully, but these errors were encountered:
In Python 3.x, urllib2 has been split into urllib.request and urllib.error. You should replace urllib2 with urllib.request and handle the exceptions using urllib.error
I am getting this error right after I execute the script, here's the try except that generates the error:
try:
logger.info("Crawling %s" % url)
request = urllib2.urlopen(req)
except urllib2.URLError, e:
logger.error("Exception at url: %s\n%s" % (url, e))
any idea what might be wrong? Thanks.
The text was updated successfully, but these errors were encountered: