Python error escape "socket.error: [Errno 54] Connection reset by peer" -
I'm running some doses running through some domains and it is
checked It seems that it is completely okay from different sources, but I am getting the error mentioned in the title.
How can I survive this? I am using HTTP terror and URL terror, but it is still hanging.
Any help on this will be great
def get_html (link): import urllib2 urllib2 Import request, Urlopen, URLError, HTTPError: res = urllib2.urlopen (Link) html = res.read (): Exclude URLRR: Exclude return link to HTTPError e: return link
Edit: Attached error is
< Code> file "/ library / framework / python framework / version -7.7 / lib / python2.7 / urllib2.py", line 127, urlopen return _opener.open (url, data, timeout) file "/ library / framework / Pth. Framework Skrn -2.7 / LB / Paithon 2.7 / Arelaibi 2 "", line 404, = self._open open response (Rik, data) file "/ Library / Frameworks / Python. Framework / Version / 2.7 / Lib / Python 2 / / urllib2.py ", line 422, _open '_open', in req)" File / Library / Framework / Python. Frameworkwork / version -7.7 / lib /python2.7/urllib2.py ", line 382, _call_chain result =" f / r / frameworks / Python.framework / version / 2.7 / lib / python2 in func (* args) file Self.do_open (httplib.HTTPConnection, req) file "/ library / framework / Python.framework / version / 2.7 / lib / python2.7 / urllib2.py", in line 1214, line 1214, http_open returns. In line 1187, do_open r = h.getresponse (buffering = true) file "/ library / framworks / python.framework / version-2.7 / lib / python2.7 /httplib.py", line 1045, getresponse response.begin () "/ Libraries / files in the file Framework / Python. Framework / version -2.7 / lib / python2.7 / httplib.py ", line 409, in the Start version, status, cause = self._read_status () file" / Library / Framework / Python. Framework / version -7.7 / lib / python2.7 / httplib.py ", line 365, _read_status line = self.fp.readline (_MAXLINE + 1) file" / Library / Framework / Python. Framework / version -7.7 / lib / Python 2 / socket usage ", line 476, in readline data = self._sock.recv (self._rbufsize) socket.error: [Errno 54] reset connection by peer
Comments
Post a Comment