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) -- --gv --

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 test whether url is live or

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 test whether url is live or

Re: URLError

2008-03-22 Thread Jim
On Mar 20, 7:03 pm, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: On Thu, 20 Mar 2008 10:26:14 -0700, Jim wrote: The program is my first and I'm not a programmer so it will take me some time to get your recommendation to work. So far the program runs after I added code based

Re: URLError

2008-03-20 Thread Jim
On Mar 19, 6:50 pm, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: On Wed, 19 Mar 2008 14:45:39 -0700, Jim wrote: Program randomly aborts when looking up url. The program loop thru 4000+ records looking up ID via internet and returnshtmlcode which is used in subsequent

Re: URLError

2008-03-20 Thread Steven D'Aprano
On Thu, 20 Mar 2008 10:26:14 -0700, Jim wrote: The program is my first and I'm not a programmer so it will take me some time to get your recommendation to work. So far the program runs after I added code based on your example but the program still aborts and none of the code (Temporary

Re: URLError

2008-03-19 Thread Steven D'Aprano
On Wed, 19 Mar 2008 14:45:39 -0700, Jim wrote: Program randomly aborts when looking up url. The program loop thru 4000+ records looking up ID via internet and returns html code which is used in subsequent processing. The code for looking-up record is below followed by abort details. Can

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