I have created this problem by adding the unique argument to a table column after populating it with data. try removing it from the has_line field.
On Monday, August 6, 2012 8:19:36 PM UTC-4, Elton Pereira de Lima wrote: > > I'm using the latest development version, and try to add a record by the > administrative interface the following exception is raised: > invalid <type'exceptions.SyntaxError'> select attribute: distinct > > The error happens when trying to insert in squid_log table. > > db.define_table('squid_internal_host', > Field('ip', 'text', notnull=True, unique=True), > Field('hostname', 'string', length=32, unique=True,), > format='%(ip)s', > migrate=True) > > db.define_table('squid_log', > Field('timestamp', 'datetime', notnull=True), > Field('internal_host', db.squid_internal_host), > Field('log_line', 'text', notnull=True), > Field('elapsed_time', 'integer', notnull=True), > Field('hash_line', 'string', notnull=True, length=64, > unique=True,), > Field('insert_timestamp', 'datetime', > default=lambda:datetime.datetime.now()), > format='%(hash_line)s') > > I'm doing something wrong? > --