). Try:
client = Client(url, timeout=500)
On 11/20/2009 09:44 AM, Jerzy Orlowski wrote:
changing the http.py file made it:
def __open(self, u2request):
socket.setdefaulttimeout(self.options.timeout)
if self.urlopener is None:
return u2.urlopen(u2request)
else:
return self.urlopener.open(u2request,timeout=500)
Could you, please, add
Client.settimout()
For the the next release?
Matt C wrote:
> I'm not sure if this will work for you, it may be worth a shot - see
> the 'missing manual' for urllib2, which shows you a way to set global
> socket options:
> #########################
> import socket
> import urllib2
>
> # timeout in seconds
> timeout = 10
> socket.setdefaulttimeout(timeout)
>
> # this call to urllib2.urlopen now uses the default timeout
> # we have set in the socket module
> req = urllib2.Request('http://www.voidspace.org.uk')
> response = urllib2.urlopen(req)
> ########################
>
> Something like this in your Suds script may help, and is worth a shot.
>
> Please post back if this works, and good luck!
> -Matt
>
> On Fri, Nov 20, 2009 at 10:10 AM, Jerzy Orlowski
> <jerzyo(a)genesilico.pl> wrote:
>> Hi
>>
>> My service takes ~5 minutes time. When I call it, I get:
>>
>> Traceback (most recent call last):
>> File "test_soap_global2.py", line 2151, in <module>
>> result=client.service.soap_create_model(INPUT_PDB, INPUT_ALIGNMENT,
>> TEMP_CHAIN_NAME, MODEL_CHAIN_NAME)
>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 537, in
>> __call__
>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 597, in
invoke
>> File "build/bdist.linux-x86_64/egg/suds/client.py", line 622, in send
>> File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 85,
in
>> send
>> File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 107,
in
>> __open
>> File "/usr/lib/python2.6/urllib2.py", line 389, in open
>> response = self._open(req, data)
>> File "/usr/lib/python2.6/urllib2.py", line 407, in _open
>> '_open', req)
>> File "/usr/lib/python2.6/urllib2.py", line 367, in _call_chain
>> result = func(*args)
>> File "/usr/lib/python2.6/urllib2.py", line 1146, in http_open
>> return self.do_open(httplib.HTTPConnection, req)
>> File "/usr/lib/python2.6/urllib2.py", line 1121, in do_open
>> raise URLError(err)
>> urllib2.URLError: <urlopen error timed out>
>>
>>
>> Jerzy Orlowski
>>
>> _______________________________________________
>> fedora-suds-list mailing list
>> fedora-suds-list(a)redhat.com
>>
https://www.redhat.com/mailman/listinfo/fedora-suds-list
>>
>
>
>
_______________________________________________
fedora-suds-list mailing list
fedora-suds-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/fedora-suds-list