038&p=45
>ZN> 872&hilit=soap#p45872>
>ZN> Code: Select all
>ZN> <http://www.python-forum.org/pythonforum/viewtopic.php?f=5&t=12876##>
>ZN> from SOAPpy import WSDL
>ZN> wsdl_file = 'http://xurrency.com/api.wsdl'
>ZN> server = WSD
rency.com/api.wsdl'
server = WSDL.Proxy(wsdl_file)
values = server.getValuesInverse('usd')
However, I got the error message below:
error: (10060, 'Operation timed out')
Can anyone kind help me with this issue? Alternatively if anyone could
pr
thanks!
I try the "try" before, but can't catch the socket error. so strange,
maybe my code was error.
I wrote a retry code block as below.
import httplib,time
while 1:
try:
conn = httplib.HTTPConnection("www.test.com")
conn.request("GET", "/")
print "success"
:\usr\bin\lib\httplib.py", line 627, in connect
> raise socket.error, msg
> socket.error: (10060, 'Operation timed out')
>
>
> how to catch this kind of error then retry the "GET" operation?
You can use this below if you only want one retry ---
import
File "D:\usr\bin\lib\httplib.py", line 627, in connect
> raise socket.error, msg
> socket.error: (10060, 'Operation timed out')
(given the code you quoted, a NameError would be more likely...)
> how to catch this kind of error then retry the "GET"
raise socket.error, msg
socket.error: (10060, 'Operation timed out')
how to catch this kind of error then retry the "GET" operation?
btw:
If I want to get many page on same server, which lib is the best
choice? I only know httplib,urllib and urllib2.
thanks a lot.
--
http://mail.python.org/mailman/listinfo/python-list
Ok, so need to see on the server side.
--
http://mail.python.org/mailman/listinfo/python-list
; raise socket.error, msg
> socket.error: (10060, 'Operation timed out')
>
So the FTP server is refusing your connection, I suspect. There's no way
the client can control the time it takes to do that.
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
H
Hi Steve,
this is the trace I have got:-
Traceback (most recent call last):
File "sumit1.py", line 39, in ?
ftp.connect(host,port)
File "C:\programs\packages\python24\lib\ftplib.py", line 129, in
connect
raise socket.error, msg
socket.error: (10060, 'Operat
Hi Steve,
Thanks, I have started the run without try and except block, I will
update with the findings tomm.
Please keep this thread on for you so that I can get the solution
--
http://mail.python.org/mailman/listinfo/python-list
Sumit Acharya wrote:
> After 20 seconds only.
>
Of course I now realise there's no default timeout on sockets anyway, so
that likely wasn't the problem.
Which statement is failing?
You would actually get much more information without the try/except
clauses, as they are stopping the traceback f
After 20 seconds only.
--
http://mail.python.org/mailman/listinfo/python-list
Sumit Acharya wrote:
> Hi Steve,
>
> It didnt help, i am getting same error.
>
After 20 seconds or 60?
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/
--
http://ma
Hi Steve,
It didnt help, i am getting same error.
--
http://mail.python.org/mailman/listinfo/python-list
Sumit Acharya wrote:
> can u please modify the script that i have posted with your suggestion,
> it will help me to a certain extent.
>
> Thanks
>
from ftplib import FTP
import time
import sys
import socket
socket.setdefaulttimeout(60)
host = sys.argv[1]
port = sys.argv[2]
for x in range(1000):
can u please modify the script that i have posted with your suggestion,
it will help me to a certain extent.
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
Sumit Acharya wrote:
> I am using following script to connect to the server and i try the
> connection for 1000 times. Some times it succeeds for all the 1000
> times,but some times it fails with error:-
> 10060, 'Operation timed out'. When it fails with the abover error, it
I am using following script to connect to the server and i try the
connection for 1000 times. Some times it succeeds for all the 1000
times,but some times it fails with error:-
10060, 'Operation timed out'. When it fails with the abover error, it
seems timed out time is 20 seconds. Is t
return self.ntransfercmd(cmd, rest)[0]
File "C:\Python23\lib\ftplib.py", line 324, in ntransfercmd
conn.connect(sa)
File "", line 1, in connect
error: (10060, 'Operation timed out')
If I transfer the files without using python script from the prompt, the
fil
willitfw wrote:
I'm including the code that I've been using. I am relatively new to
python, and not sure if a socket was created:
*
import socket
socket.setdefaulttimeout(None)
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
The last line above creates a socket... and I su
I'm including the code that I've been using. I am relatively new to
python, and not sure if a socket was created:
*
import socket
socket.setdefaulttimeout(None)
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
from urllib import urlopen
import urllib, urlparse, string, t
Larry Bates wrote:
My manual says that socket has a settimeout(value) but I don't
seem to find anything on socket.setdefaulttimeout method you
refer to.
Larry, the module has a setdefaulttimeout() function,
while socket objects themselves have a settimeout().
To the OP: did you already create your
nt to s.setblocking(1). New in
version 2.3.
-Larry Bates
willitfw wrote:
> Does anyone know how to prevent this error from occurring: IOError:
> [Errno socket error] (10060, 'Operation timed out').
>
> I am using the following code without any luck. Obviously I am missing
>
Does anyone know how to prevent this error from occurring: IOError:
[Errno socket error] (10060, 'Operation timed out').
I am using the following code without any luck. Obviously I am missing
something.
import socket
socket.setdefaulttimeout(20)
Thank you in advance.
Tom Williams
24 matches
Mail list logo