Also, I should note, this doesn't specifically have to be a SQLForm.grid. 
I'm just trying to display the results of the query. In my controller I'm 
using Ext.js to render to the view. So if I could assign the value of the 
rows object to an Ext.js store or some other mechanism for display that 
would work better.

Thanks,
Jamie

On Sunday, March 10, 2013 7:32:30 PM UTC-4, Jamie Jernigan wrote:
>
> Sure, and thank you for the fast response. I had logged off for the night.
>
> Traceback (most recent call last):
>   File "/home/ameteq/webapps/web2py/web2py/gluon/restricted.py", line 204, in 
> restricted
>     exec ccode in environment
>   File 
> "/home/ameteq/webapps/web2py/web2py/applications/sms_test_protocol/controllers/default.py"
>  
> <https://admin.ameteq.com/admin/default/edit/sms_test_protocol/controllers/default.py>,
>  line 1197, in <module>
>   File "/home/ameteq/webapps/web2py/web2py/gluon/globals.py", line 172, in 
> <lambda>
>     self._caller = lambda f: f()
>   File 
> "/home/ameteq/webapps/web2py/web2py/applications/sms_test_protocol/controllers/default.py"
>  
> <https://admin.ameteq.com/admin/default/edit/sms_test_protocol/controllers/default.py>,
>  line 1006, in compliance
>     form = SQLFORM.grid(query=query, fields=fields, headers=headers, 
> sortable=True, create=False, deletable=False, editable=False, 
> maxtextlength=64, paginate=25)
>   File "/home/ameteq/webapps/web2py/web2py/gluon/sqlhtml.py", line 1455, in 
> grid
>     db = query._db
> AttributeError: 'Rows' object has no attribute '_db'
>
> There was also this, I don't know if it helps:
>
> Function argument list 
>
> (query=<gluon.dal.Rows object>, fields=[<gluon.dal.Field object>, 
> <gluon.dal.Expression object>], field_id=None, left=None, 
> headers={<gluon.dal.Field object>: 'Non-Compliant Codes', 
> <gluon.dal.Expression object>: 'Number of Non-Compliant Responses'}, 
> orderby=None, searchable=True, sortable=True, paginate=25, deletable=False, 
> editable=False, details=True, selectable=None, create=False, csv=True, 
> links=None, links_in_grid=True, upload='<default>', args=[], 
> user_signature=True, maxtextlengths={}, maxtextlength=64, 
> onvalidation=None, oncreate=None, onupdate=None, ondelete=None, 
> sorter_icons=(<gluon.html.XML object>, <gluon.html.XML object>), 
> ui={'button': 'button', 'buttonadd': 'icon plus', 'buttonback': 'icon 
> leftarrow', 'buttondelete': 'icon trash', 'buttonedit': 'icon pen', 
> 'buttonexport': 'icon downarrow', 'buttontable': 'icon rightarrow', 
> 'buttontext': 'buttontext button', 'buttonview': 'icon magnifier', 
> 'content': '', ...}, showbuttontext=True, _class='web2py_grid', 
> formname='web2py_grid', search_widget='default', ignore_rw=False, 
> formstyle='table3cols')
>  Code listing 
>
> 1450.
> 1451.
> 1452.
> 1453.
> 1454.
> 1455.
>
> 1456.
> 1457.
> 1458.
> 1459.
>
>                       )
>         elif not isinstance(ui,dict):
>             raise RuntimeError,'SQLFORM.grid ui argument must be a dictionary'
>
>         from gluon import current, redirect
>         db = query._db
>
>         T = current.T
>         request = current.request
>         session = current.session
>         response = current.response
>
>  Variables query <gluon.dal.Rows object>  db undefined  query._db 
> undefined
>
>
>
> On Saturday, March 9, 2013 10:17:10 PM UTC-5, Massimo Di Pierro wrote:
>>
>> Can you show the complete traceback
>>
>> On Saturday, 9 March 2013 17:13:24 UTC-6, Jamie Jernigan wrote:
>>>
>>> Hi ,
>>>
>>> I'm new to Web2py and I've been struggling with this the last couple of 
>>> days. I'm getting 
>>> 'Rows' object has no attribute '_db'
>>>
>>>
>>> on:
>>>
>>>  query= 
>>> db((db.MONITOR_CODES.MC_ID==db.MC_VALID_RESPONSES.MC_ID)&(db.MC_VALID_RESPONSES.COMPLIANCE_FLAG=='N')).select(db.MONITOR_CODES.MC_DESCR,
>>>  
>>> db.MC_VALID_RESPONSES.MC_ID.count(),left=db.MONITOR_CODES.on
>>>     
>>> (db.MONITOR_CODES.MC_ID==db.MC_VALID_RESPONSES.MC_ID),groupby=db.MONITOR_CODES.MC_ID)
>>>     
>>>     fields=[db.MONITOR_CODES.MC_DESCR, 
>>> db.MC_VALID_RESPONSES.MC_ID.count()]
>>>     headers={db.MONITOR_CODES.MC_DESCR: 'Non-Compliant Codes',
>>>              db.MC_VALID_RESPONSES.MC_ID.count(): 'Number of 
>>> Non-Compliant Responses'}
>>>     
>>>     form = SQLFORM.grid(query=query, fields=fields, headers=headers, 
>>> sortable=True, create=False, deletable=False, editable=False, 
>>> maxtextlength=64, paginate=25)
>>>
>>> Thank you for your time,
>>>
>>> Jamie
>>>
>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to