SOAPpy Error
文章目录
【注意】最后更新于 April 10, 2012,文中内容可能已过时,请谨慎使用。
今天准备用SOAPpy来写一个最简单的soap client,代码如下:
|
|
运行的时候出现了这个问题:
Traceback (most recent call last): File “remedy_ws_client.py”, line 9, in
wsdlObject = WSDL.Proxy(WSDLfile) File “build/bdist.macosx-10.6-universal/egg/SOAPpy/WSDL.py”, line 85, in init File “/Library/Python/2.6/site-packages/wstools-0.3-py2.6.egg/wstools/WSDLTools.py”, line 47, in loadFromString return self.loadFromStream(StringIO(data)) File “/Library/Python/2.6/site-packages/wstools-0.3-py2.6.egg/wstools/WSDLTools.py”, line 28, in loadFromStream document = DOM.loadDocument(stream) File “/Library/Python/2.6/site-packages/wstools-0.3-py2.6.egg/wstools/Utility.py”, line 635, in loadDocument return xml.dom.minidom.parse(data) File “/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xml/dom/minidom.py”, line 1918, in parse return expatbuilder.parse(file) File “/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xml/dom/expatbuilder.py”, line 928, in parse result = builder.parseFile(file) File “/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xml/dom/expatbuilder.py”, line 207, in parseFile parser.Parse(buffer, 0) xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 5
查了很久,最后发现是因为公司网络需要代理的缘故,造成python不能连接网络。解决办法就是:
|
|