我有一个简单的Python脚本,它使用sud从SOAP web服务中提取数据。它在一台机器上工作得很好,但是当我将它移到另一台有较旧版本Python(2.4.3)的机器上时,我得到了以下堆栈跟踪:>>> client = suds.client.Client(url, username='xxx', password='xxx', location=service_location, cache=None)
Traceback (most recent call last):
File "", line 1, in ?
File "/home/etlsmart/lib/python2.4/site-packages/suds/client.py", line 112, in __init__
self.wsdl = reader.open(url)
File "build/bdist.linux-i686/egg/suds/reader.py", line 152, in open
File "build/bdist.linux-i686/egg/suds/wsdl.py", line 136, in __init__
File "build/bdist.linux-i686/egg/suds/reader.py", line 79, in open
File "build/bdist.linux-i686/egg/suds/reader.py", line 101, in download
File "/home/etlsmart/lib/python2.4/site-packages/suds/sax/parser.py", line 136, in parse
sax.parse(source)
File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 109, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.4/site-packages/_xmlplus/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib/python2.4/site-packages/_xmlplus/sax/expatreader.py", line 220, in feed
self._err_handler.fatalError(exc)
File "/usr/lib/python2.4/site-packages/_xmlplus/sax/handler.py", line 38, in fatalError
raise exception
xml.sax._exceptions.SAXParseException: :18:2: mismatched tag
我已经研究了与缓存相关的各种错误,但这似乎不是问题所在。我禁用了缓存,/tmp/suds在任何情况下都只包含一个版本文件。
这可能与Python版本有关,还是有其他明显的东西需要我尝试?