Re: URLError:

2022-02-12 Thread Gisle Vanem
Shaozhong SHI wrote: The following is used in a loop to get response code for each url. print (urllib.request.urlopen(url).getcode()) However, error message says: URLError: 11001 == WSAHOST_NOT_FOUND. Look in any 'winsock.h' header: #define WSAHOST_NOT_FOUND (WSABASEERR+1001

Re: URLError:

2022-02-12 Thread Chris Angelico
On Sun, 13 Feb 2022 at 07:17, Shaozhong SHI wrote: > > The following is used in a loop to get response code for each url. > > print (urllib.request.urlopen(url).getcode()) > > However, error message says: URLError: getaddrinfo failed> > > Python 3.6.5 is being used to

Re: URLError:

2022-02-12 Thread Peter J. Holzer
On 2022-02-12 20:15:43 +, Shaozhong SHI wrote: > The following is used in a loop to get response code for each url. > > print (urllib.request.urlopen(url).getcode()) > > However, error message says: URLError: getaddrinfo failed> > > Python 3.6.5 is being used to tes

URLError:

2022-02-12 Thread Shaozhong SHI
The following is used in a loop to get response code for each url. print (urllib.request.urlopen(url).getcode()) However, error message says: URLError: Python 3.6.5 is being used to test whether url is live or not. Can anyone shed light on this? Regards, David -- https://mail.python.org

URLError errno and strerror not set

2009-07-16 Thread 1x7y2z9
python 2.5.2 errno, strerror and message do not appear to be set in the following two cases (at least). Is this to be expected? (as an aside, arg[0] is set) # case 1 > print exception, exception.errno, exception.strerror, exception.message == '' None None True # case 2 > print exception, exce

Re: urllib2.URLError: error using twill with python

2009-06-29 Thread amadain
On Jun 8, 12:58 pm, Steven D'Aprano wrote: > On Mon, 08 Jun 2009 12:14:18 +0100, Mark Devine wrote: > > Hi > > I wonder if someone could point me in the right direction. I used the > > following code to access gmail but I got a > >          urllib2.URLError:

Re: urllib2.URLError: error using twill with python

2009-06-08 Thread Steven D'Aprano
On Mon, 08 Jun 2009 12:14:18 +0100, Mark Devine wrote: > Hi > I wonder if someone could point me in the right direction. I used the > following code to access gmail but I got a > urllib2.URLError: > error when I ran it. I have included the Traceback > > import

urllib2.URLError: error using twill with python

2009-06-08 Thread Mark Devine
Hi I wonder if someone could point me in the right direction. I used the following code to access gmail but I got a urllib2.URLError: error when I ran it. I have included the Traceback import twill, string, os b=twill.commands.get_browser() b.set_agent_string("Mozilla/5.0 (Windo

Re: urllib2.URLError:

2009-03-12 Thread Coonay
i update via http proxy cmd>set HTTP_PROXY=http://cache.mycompany.com:3128 cmd>python appcfg.py update myapp URLError: Traceback (most recent call last): File "C:\Program Files\Google\google_appengine\appcfg.py", line 60, in run_file(__file__, globals()) File "C:

Re: urllib2.URLError:

2009-03-11 Thread Chris Rebert
ile "C:\PROGRA~1\Python26\lib\urllib2.py", line 361, in > _call_chain >    result = func(*args) >  File "C:\PROGRA~1\Python26\lib\urllib2.py", line 1163, in > unknown_open >    raise URLError('unknown url type: %s' % type) > urllib2.URLError: A

urllib2.URLError:

2009-03-10 Thread Coonay
uot;, line 383, in open response = self._open(req, data) File "C:\PROGRA~1\Python26\lib\urllib2.py", line 406, in _open 'unknown_open', req) File "C:\PROGRA~1\Python26\lib\urllib2.py", line 361, in _call_chain result = func(*args) File "C:\PROGR

Re: URLError

2008-03-22 Thread Jim
program runs after I > > added code based on your example but the program still aborts and none > > of the code ("Temporary failure, Skip/Halt/try Again?" or "Unknown > > response, boo hiss to you!") in your example is displayed. > > Try replacing the line: &

Re: URLError

2008-03-20 Thread Steven D'Aprano
code ("Temporary failure, Skip/Halt/try Again?" or "Unknown > response, boo hiss to you!") in your example is displayed. Try replacing the line: except URLError, e: with: except urllib2.URLError, e: and see if that helps. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: URLError

2008-03-20 Thread Jim
offending code with a try...except loop, something similar > to this. > > try: > contents = urllib2.urlopen(url).read() > except URLError, e: > if e.errno == 10053: > # "Software caused connection abort" > response = raw_input( >

Re: URLError

2008-03-19 Thread Steven D'Aprano
y abort details. Can anyone > help with catching the > abort before program aborts or provide code to automatically start > program? Yes. Wrap the offending code with a try...except loop, something similar to this. try: contents = urllib2.urlopen(url).read() except URLError, e:

URLError

2008-03-19 Thread Jim
, line 353, in _call_chain result = func(*args) File "C:\Python25\lib\urllib2.py", line 1100, in http_open return self.do_open(httplib.HTTPConnection, req) File "C:\Python25\lib\urllib2.py", line 1075, in do_open raise URLError(err) URLError: -- http://mail.python.org/mailman/listinfo/python-list

Re: urlerror, urllib2: "no address" ... why or debug tips?

2006-03-10 Thread Rene Pijlman
[EMAIL PROTECTED]: >Help please with a URLError. Post your code (a small self-contained example, preferrably) and the URL. -- René Pijlman -- http://mail.python.org/mailman/listinfo/python-list

urlerror, urllib2: "no address" ... why or debug tips?

2006-03-09 Thread joemynz
Help please with a URLError. Invoking a url that works in Firefox and IE results in a "urlerror 7, no address ..." in python. I need to debug why. Traceback is below. There's a redirect when the url is invoked (it's part of a chain) - you can see it using liveheaders in firef

urllib2.URLError:

2005-07-15 Thread peter patel
Urlopen error - (7, 'getaddrinfo failed') It means their tracker is overworked. Nothin you can do about it.. let it run.. it should start workin sooner or later. -- http://mail.python.org/mailman/listinfo/python-list

urllib2.URLError: when trying to connect through a proxy

2005-03-01 Thread Matt
urllib2.py", line 129, in urlopen return _opener.open(url, data) File "C:\Python23\lib\urllib2.py", line 326, in open '_open', req) File "C:\Python23\lib\urllib2.py", line 306, in _call_chain result = func(*args) File "C:\Python23\lib\urllib2.py&q