>
> While putting together an example of the error I found that my example 
>> worked fine, in fact I'm getting HTML instead of CSV from a grid that was 
>> not created from an AJAX call.
>>
>
This must be something that I've cause but with such a simplified 
application I'm stumped as to what is causing this. 

Looking through the HTML I can see my error printed out from the traceback 
and here's what it shows:

got an error: (200 OK) Traceback (most recent call last):
   File 
&quote;/opt/web2py/applications/testApp/controllers/audit.py&quote;, line 
32, in auditUsers
       grid=SQLFORM.grid(dbOra.personnel)
   File &quote;/opt/web2py/gluon/sqlhtml.py&quote;, line2225, in grid
      raise HTTP(200, oExxp.export(), **response.headers)
HTTP: 200 OK

 

My controller is very simple:

def auditUsers():
   try:
      grid=SQLFORM.grid(dbOra.personnel)
   except Exception, err:
      grid='got an error: (%s) %s' %(str(err), traceback.format_exc())
   return(message="done",grid=grid)

And my view is just as simple:

{{right_sidebar_enabled,left_sidebar_enabled,('message' in globals())}}
{{extend 'layout.html'}}

<h1>{{=message}}</h1>
{{=grid}}


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to