0

I am trying to access a list of subscribers that exists inside ET via your API calls, but am receiving a time out error (even when just querying a single list).

This seems to be some sort of performance issue on your side as the list is small (<20 people) but I have not been able to successfully retrieve it.

Here is the stack trace of the error:

JMoneyMacBook:sendgrid-stats jsinclair$ python et-list-subscriber.py 
>>> Retrieve all Subscribers on List 1391770
Traceback (most recent call last):
File "et-list-subscriber.py", line 31, in 
main()
File "et-list-subscriber.py", line 27, in main
getSubscribersOnList(curr_list)
File "et-list-subscriber.py", line 13, in getSubscribersOnList
getResponse = getListSubs.get()
File "/usr/local/lib/python2.7/site-packages/FuelSDK/rest.py", line 288, in get
obj = ET_Get(self.auth_stub, self.obj_type, props, search_filter)
File "/usr/local/lib/python2.7/site-packages/FuelSDK/rest.py", line 192, in __init__
response = auth_stub.soap_client.service.Retrieve(ws_retrieveRequest) 
File "/usr/local/lib/python2.7/site-packages/suds/client.py", line 538, in __call__
return client.invoke(args, kwargs)
File "/usr/local/lib/python2.7/site-packages/suds/client.py", line 602, in invoke
result = self.send(soapenv)
File "/usr/local/lib/python2.7/site-packages/suds/client.py", line 637, in send
reply = transport.send(request)
File "/usr/local/lib/python2.7/site-packages/suds/transport/https.py", line 64, in send
return HttpTransport.send(self, request)
File "/usr/local/lib/python2.7/site-packages/suds/transport/http.py", line 77, in send
fp = self.u2open(u2request)
File "/usr/local/lib/python2.7/site-packages/suds/transport/http.py", line 118, in u2open
return url.open(u2request, timeout=tm)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1240, in https_open
context=self._context)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1200, in do_open
r = h.getresponse(buffering=True)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1136, in getresponse
response.begin()
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 453, in begin
version, status, reason = self._read_status()
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 409, in _read_status
line = self.fp.readline(_MAXLINE + 1)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 480, in readline
data = self._sock.recv(self._rbufsize)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 734, in recv
return self.read(bu`enter code here`flen)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 621, in read
v = self._sslobj.read(len or 1024)
ssl.SSLError: ('The read operation timed out',)
  • Any help here? This is still a problem and I don't seem to have any way to resolve this issue. – Jeff Sinclair Dec 29 '16 at 1:59
5

I ran into this same issue. Try setting a larger timeout. This option isn't anywhere in the FuelSDK documentation. I had to dig into FuelSDK and SUDS source. SUDS default timeout is 90 seconds.

https://bitbucket.org/jurko/suds/src/94664ddd46a61d06862fa8fb6ba7b9e054214f57/suds/transport/options.py?at=default&fileviewer=file-view-default

myClient = FuelSDK.ET_Client()
myClient.soap_client.set_options(timeout=300)

Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.