i had the same problem.Now solved. check previous post http://osdir.com/ml/web2py/2011-08/msg00232.html
2011/8/4 Cliff <cjk...@gmail.com> > I get an exception from this code in db.py: > > auth.settings.extra_fields['auth_user'].append(Field('created_by', > default=session.auth.user.id), writable=False, readable=False) > > Here is the exception: > > Traceback (most recent call last): > File "/media/Myfiles/w2p-1-98-2/web2py/gluon/restricted.py", line > 192, in restricted > exec ccode in environment > File "/media/Myfiles/w2p-1-98-2/web2py/applications/Purchasing/ > models/db.py", line 48, in <module> > auth.settings.extra_fields['auth_user'].append(Field('created_by', > KeyError: 'auth_user' > > The code is before the call to "define_tables()" > > Am I doing something wrong or is this a Web2py problem?