[BangPypers] Python-yql error

Anand Balachandran Pillai abpillai at gmail.com
Thu Oct 14 15:33:16 CEST 2010


Runs fine for me.

Python 2.7 (r27:82500, Oct  8 2010, 14:07:56)
[GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import yql
>>> y = yql.Public()
>>> y.execute('select * from flickr.photos.search where text="panda" limit
3')
<yql.YQLObj object at 0xb7b50f8c>
>>>

Btw, the traceback seems to indicate you have installed httplib2
on top of the standard httplib which comes with Python.


   1. /usr/lib/python2.6/site-packages/httplib2/__init__.pyc in connect(self
   )
   2.     734             sock = socket.socket(socket.AF_INET, socket.
   SOCK_STREAM)
   3.     735         if self.timeout is not None:
   4. --> 736             sock.settimeout(self.timeout)
   5.     737         sock.connect((self.host, self.port))
   6.     738         ssl = socket.ssl(sock, self.key_file, self.cert_file)

Try removing httplib2 and see if it works.

--Anand


On Wed, Oct 13, 2010 at 8:53 PM, JAGANADH G <jaganadhg at gmail.com> wrote:

> Dear All
> I was trying to run the following code
>
> >>> import yql
> >>> y = yql.Public()
> >>> query = 'select * from flickr.photos.search where text="panda" limit
> 3';
> >>> result = y.execute(query)
>
> When i execute the fourth line I am getting the error
> http://pastebin.com/HryAZVEA .
> Any clue how to resolve this.
>
> --
> **********************************
> JAGANADH G
> http://jaganadhg.freeflux.net/blog
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
--Anand


More information about the BangPypers mailing list