Sorry, my mistake! Of course I have tried to find the wrong text in my code three times before asking, but apperently insufficient. Thank you for the hint with the "grep" coomand - it helped to find the error.
2012/9/11 Massimo Di Pierro <massimo.dipie...@gmail.com> > Not in web2py. Perhaps in the code you are running? > > $ grep '%(first_name)' gluon/*.py > gluon/tools.py: user_identifier = '%(first_name)s' > gluon/tools.py: return '%(first_name)s %(last_name)s' % user > gluon/tools.py: format='%(first_name)s > %(last_name)s (%(id)s)')) > > > > > On Tuesday, 11 September 2012 13:14:11 UTC-5, mweissen wrote: >> >> I wanted to see a row of a table and I started the database >> administration tool. I get the following snapshot. There is a trailing >> "%", but no "s" - why? >> self.label '%(last_name)s %(first_name)%' >> Error snapshot [image: help] >> >> <type 'exceptions.KeyError'>('first_**name') >> >> inspect attributes >> Frames >> >> - >> >> *File D:\dropbox\InfoSMS\web2py\gluon\restricted.py in restricted at >> line 209* code arguments variables >> - >> >> *File >> D:\dropbox\InfoSMS\web2py\applications\secure\controllers\appadmin.py >> in <module> at line 441* code arguments variables >> - >> >> *File D:\dropbox\InfoSMS\web2py\gluon\globals.py in <lambda> at line >> 185* code arguments variables >> - >> >> *File >> D:\dropbox\InfoSMS\web2py\applications\secure\controllers\appadmin.py >> in update at line 283* code arguments variables >> - >> >> *File D:\dropbox\InfoSMS\web2py\gluon\sqlhtml.py in __init__ at line >> 1015* code arguments variables >> - >> >> *File D:\dropbox\InfoSMS\web2py\gluon\sqlhtml.py in widget at line 227 >> * code arguments variables >> - >> >> *File D:\dropbox\InfoSMS\web2py\gluon\validators.py in _options at >> line 2480* code arguments variables >> - >> >> *File D:\dropbox\InfoSMS\web2py\gluon\validators.py in options at >> line 479* code arguments variables >> - >> >> *File D:\dropbox\InfoSMS\web2py\gluon\validators.py in build_set at >> line 474* code arguments variables >> Function argument list >> >> (self=<gluon.validators.IS_IN_**DB object>) >> Code listing >> >> >> 469. >> 470. >> 471. >> 472. >> 473. >> 474. >> >> 475. >> 476. >> 477. >> 478. >> >> >> reduce(lambda a,b:a|b,(f for f in fields if not >> f.name=='id')) >> >> >> >> dd = dict(orderby=orderby, cache=self.cache) >> >> >> >> records = self.dbset(table).select(table**.ALL, **dd) >> >> >> >> self.theset = [str(r[self.kfield]) for r in records] >> >> >> >> if isinstance(self.label,str): >> >> >> self.labels = [self.label % dict(r) for r in records] >> >> >> >> else: >> self.labels = [self.label(r) for r in records] >> >> >> >> def options(self, zero=True): >> >> Variables self.labels undefined self <gluon.validators.IS_IN_DB >> object> records <Rows (897)> r <Row {'sprechtag_wunsch': <Set >> (sprechtag_wunsch... <gluon.dal.RecordDeleter object at 0x09DB2350>}> >> self.label '%(last_name)s %(first_name)%' builtindict <type 'dict'> >> >> Context >> >> Regards, Martin >> > -- > --