使用 SOAPpy 调用 Web 服务时容易遇到<HTTPError 500 Internal Server Error>报错情况。
可以使用while : try: except: 来尽量规避这样的报错。
举例:
succes = 0
while succes < 10:
try:
'''
访问服务器所用代码。
'''
succes = 10
except:
#Let the server cool of for a bit. If after 10 times it
#still fails, the query is discarded:
time.sleep(1)
succes += 1