[Tutor] Re: SOAP

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Fri, 5 Jul 2002 22:02:08 -0700 (PDT)


Hi Dominic,

Hmmm.  I'm reading more about this SOAP stuff, and I'm somewhat unhappy
about it; it feels so scattered all over the place.


> So I went and got pyGoogle, built and installed, and ran the following:
>
> >>> import google
> >>> google.LICENSE_KEY = myLicenceKey
> >>> google.doGoogleSearch("Python SOAP")
>
> and got the exact same error message. Here I am stuck!


I haven't been able to duplicate the error yet.  *sigh* However, I have
been able to get it to work.  Here's what it looks on my machine:

###
>>> import google
>>> google.setLicense(license_key)
>>> search = google.doGoogleSearch('final fantasy tactics')
>>> for result in search.results[:10]:
...     print result.title, result.snippet
...
<b>Final</b> <b>Fantasy</b> Classes Quiz Which <b>Final</b> <b>Fantasy</b>
Class Should You Be? 1. Gender? Male. Female Does it matter?<br> 2. Is
your main strength in magic? Of course! Magic is my life! <b>...</b>
[lots and lots of output cut]
###


I get the feeling that the error you're running into may be some conflict
between the modified SOAP.py library that's used in pygoogle, as opposed
to the original SOAP.py library if you've installed it.  If so, remove the
old version of SOAP.py in your "site-packages" directory first, and then
try again.


Talk to you later!