yes.

You are not supposed to return an iterable (in your case a list). web2py 
thinks you want to do streaming and will start looping over the iterable. 
This should change in web3py not we cannot change it in web2py.

Massimo

On Thursday, 20 December 2012 10:24:05 UTC-6, Manuele wrote:
>
> trying to expose this simple controller I got the subsequent error... 
> does anybody understand why? 
> the query runs perfectly inserted manually in a ipdb console... 
>
> @service.json 
> def mRender(): 
>
>      #import ipdb; ipdb.set_trace() 
>      query = (db.plugin_lookout_fields.table_id==source_table_id) 
>      res = db(query).select(db.plugin_lookout_fields.field_name, 
> limitby=(1, 4, )).as_list() 
>
>      return res 
>
> ERROR:Rocket.Errors.Thread-3:Unhandled Error when serving connection: 
> Traceback (most recent call last): 
>
>    File "/home/manuele/portali/web2py-2.2.1/gluon/rocket.py", line 1318, 
> in run 
>      self.run_app(conn) 
>
>    File "/home/manuele/portali/web2py-2.2.1/gluon/rocket.py", line 1840, 
> in run_app 
>      self.conn.sendall(b('0\r\n\r\n')) 
>
>    File "/usr/lib/python2.7/socket.py", line 224, in meth 
>      return getattr(self._sock,name)(*args) 
>
> error: [Errno 32] Broken pipe 
>

-- 



Reply via email to