The error is on this line: response.write(LI(A(obra.numero, _href=URL(r=request, f='show', args = [obra.id])),' ',obra.nome))
at "obra.id". Are you sure in your controller obras=db(...).select(....) you are selecting all fields or db.obra.id? On Sep 14, 3:44 pm, Carlos Aboim <abo...@gmail.com> wrote: > Let me post something else to complete the question: > This error occurs when I am inserting some data in db. > And in my own views! From admin page everything is ok. > > Sorry for the late explanation post! But I was in a hurry to finish > the company jobs. > > thanks > CA > > 2009/9/14 mdipierro <mdipie...@cs.depaul.edu>: > > > > > Can we see lines 60-70 from this ticket? > > > On Sep 14, 5:11 am, Carlos Aboim <abo...@gmail.com> wrote: > >> Hi group, > > >> I have an app that is working ok execpt I am getting a id error from > >> DB > > >> Traceback (most recent call last): > >> File "/Users/preimpressao/Desktop/web2py/gluon/restricted.py", line > >> 178, in restricted > >> exec ccode in environment > >> File "/Users/preimpressao/Desktop/web2py/applications/registos/views/ > >> obras/index.html", line 64, in <module> > >> File "/Users/preimpressao/Desktop/web2py/gluon/sql.py", line 537, in > >> __getattr__ > >> return dict.__getitem__(self,key) > >> KeyError: 'id' > > >> is it suficient to get a clue? > > >> thanks for the help > >> CA --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---