Can you check that there is not a space at the end of key. Maybe change to :
raise SyntaxError, 'invalid table "%s" attribute: "%s"' % (tablename, key) and look for garbage in the the result? --r On May 17, 2010, at 5:33 PM, mdipierro wrote: > I am going to need your help in debugging this. In sql.py around lines > 2115 > > for key in args: > if key not in [ > 'migrate', > 'primarykey', > 'fake_migrate', > 'format', > 'trigger_name', > 'sequence_name']: > raise SyntaxError, 'invalid table "%s" attribute: %s' % > (tablename, key) > > Somehow the last lines raises this exception: > > SyntaxError: invalid table "area" attribute: sequence_name > > but sequence_name is in the list above so the exception should not be > raised. > > Any idea? > > On May 17, 6:31 pm, drayco <[email protected]> wrote: >> Hi, I updated my web2py, but I had a problem with web2py 1.78.3, I use >> legacy databases. When I try to go to my application I got this >> >> Error traceback >> >> Traceback (most recent call last): >> File "/media/RESPALDO/web2py/gluon/restricted.py", line 178, in >> restricted >> exec ccode in environment >> File "/media/RESPALDO/web2py/applications/scada/models/ >> calenergy.py", line 8, in <module> >> migrate = False) >> File "/media/RESPALDO/web2py/gluon/sql.py", line 1296, in >> define_table >> **dict(primarykey=args['primarykey'], trigger_name=trigger_name, >> sequence_name=sequence_name)) >> File "/media/RESPALDO/web2py/gluon/sql.py", line 2115, in __init__ >> raise SyntaxError, 'invalid table "%s" attribute: %s' % >> (tablename, k) >> SyntaxError: invalid table "area" attribute: sequence_name >> >> In file: /media/RESPALDO/web2py/applications/scada/models/calenergy.py >> >> calenergy=SQLDB('mysql://xxx:[email protected]:3306/xxx',pool_size=10) >> >> calenergy.define_table('area', >> Field('clave', type = 'char' , length = 3 ), >> Field('IdZona', type = 'integer' , length = 10 ), >> Field('nombre', type = 'string' , length = 50 ), >> primarykey=['clave','IdZona'], >> migrate = False) >> >> Even with web2py 1.77.3. >> >> What this mean? >> >> with my older version of web2py, I work well. Russ Ferriday - Topia Systems - Open Source content management with Plone and Zope [email protected] - mobile: +1 805 234 6915 - skype: ferriday

