Re: urllib2 timeout issue

2013-10-18 Thread Jérôme
Thu, 17 Oct 2013 15:55:06 +0200 Ervin Hegedüs a écrit: Has your router/modem any HTTP proxy feature? If yes, maybe the proxy gives the late answer. I don't think so. I didn't find anything like this in the config. Anyway, if you don't have proxy, and the DNS error cames from local system,

Re: urllib2 timeout issue

2013-10-17 Thread Jérôme
Hi. Thank you all for your answers. -- Context: The problem I want to address is the code being stuck too long when the network is down. I'm working on a software gateway running on a Raspberry Pi, that forwards data received through a radio link

Re: urllib2 timeout issue

2013-10-17 Thread Ervin Hegedüs
Hello, On Thu, Oct 17, 2013 at 03:34:05PM +0200, Jérôme wrote: Hi. Thank you all for your answers. -- Context: The problem I want to address is the code being stuck too long when the network is down. I'm working on a software gateway

urllib2 timeout issue

2013-10-16 Thread Jérôme
Hi all. I'm having troubles with urllib2 timeout. See the following script : import urllib2 result = urllib2.urlopen(http://dumdgdfgdgmyurl.com/;) print result.readline() If run on my Debian Wheezy computer, or on my Debian Squeeze

Re: urllib2 timeout issue

2013-10-16 Thread Vincent Vande Vyvre
Le 16/10/2013 11:21, Jérôme a écrit : Hi all. I'm having troubles with urllib2 timeout. See the following script : import urllib2 result = urllib2.urlopen(http://dumdgdfgdgmyurl.com/;) print result.readline() If run on my Debian

Re: urllib2 timeout issue

2013-10-16 Thread Peter Otten
Jérôme wrote: Hi all. I'm having troubles with urllib2 timeout. See the following script : import urllib2 result = urllib2.urlopen(http://dumdgdfgdgmyurl.com/;) print result.readline() If run on my Debian Wheezy computer,

Re: urllib2 timeout issue

2013-10-16 Thread Piet van Oostrum
Jérôme jer...@jolimont.fr writes: Hi all. I'm having troubles with urllib2 timeout. See the following script : import urllib2 result = urllib2.urlopen(http://dumdgdfgdgmyurl.com/;) print result.readline() If run on my Debian

Re: urllib2 timeout issue

2013-10-16 Thread Tim Chase
On 2013-10-16 13:22, Peter Otten wrote: The problem might be ipv6-related. I second this as the likely culprit -- I've had to disable IPv6 on my Debian laptop since my ATT router is brain-dead and doesn't seem to support it, so I would often get timeouts similar to what is the OP describes and

Re: urllib2 timeout issue

2013-10-16 Thread Tobiah
If run on my Debian Wheezy computer, or on my Debian Squeeze server, the answer is instantaneous : [...] urllib2.URLError: urlopen error [Errno -2] Name or service not known When run on my Raspberry Pi with Raspian Wheezy, the answer is identical but it takes 10 seconds. What happens when