problem with google api / xml

robin robin.meier at gmail.com
Wed May 31 11:10:48 CEST 2006


hello,

i installed SOAPpy 0.12.0 and pyXML 0.8.4 in order to try out the
google-search example in diveintopython
http://diveintopython.org/soap_web_services/index.html
however, i'v been trying and trying and won't get it to work :-(
whenever i run this code, i get the attached exception...

from SOAPpy import WSDL
WSDLFILE = '/pathtomy/googleapi/GoogleSearch.wsdl'
APIKEY = '....'
_server = WSDL.Proxy(WSDLFILE)

any help would be very much appreciated!
thanks in advance,
robin

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/SOAPpy/WSDL.py",
line 67, in __init__
    self.wsdl = reader.loadFromString(str(wsdlsource))
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/SOAPpy/wstools/WSDLTools.py",
line 47, in loadFromString
    return self.loadFromStream(StringIO(data))
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/SOAPpy/wstools/WSDLTools.py",
line 28, in loadFromStream
    document = DOM.loadDocument(stream)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/SOAPpy/wstools/Utility.py",
line 602, in loadDocument
    return xml.dom.minidom.parse(data)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/_xmlplus/dom/minidom.py",
line 1915, in parse
    return expatbuilder.parse(file)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/_xmlplus/dom/expatbuilder.py",
line 930, in parse
    result = builder.parseFile(file)
  File
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/_xmlplus/dom/expatbuilder.py",
line 207, in parseFile
    parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1,
column 0




More information about the Python-list mailing list