Resolve I don't know why but i change the name of the table and now work :)
On Thursday, 21 January 2016 20:49:04 UTC+1, Niphlod wrote:
>
> did you alter in any way the auth_user table ?
>
> On Thursday, January 21, 2016 at 8:43:07 PM UTC+1, Alessio Varalta wrote:
>>
>> Hi I have a database in sqlite..today I try to add new table..very simple
>>
>> db.define_table('viewnews',
>> Field('user_id','reference
>> auth_user',requires=IS_NOT_EMPTY()),
>> )
>>
>> but when i insert a row a have this error
>>
>> Traceback (most recent call last):
>> File "/home/www-data/web2py/applications/coop/controllers/appadmin.py",
>> line 269, in select
>> *fields, limitby=(start, stop))
>> File "/home/www-data/web2py/gluon/packages/dal/pydal/objects.py", line
>> 2002, in select
>> return adapter.select(self.query,fields,attributes)
>> File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/sqlite.py",
>> line 122, in select
>> return super(SQLiteAdapter, self).select(query, fields, attributes)
>> File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py",
>> line 1286, in select
>> return self._select_aux(sql,fields,attributes)
>> File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py",
>> line 1243, in _select_aux
>> self.execute(sql)
>> File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py",
>> line 1378, in execute
>> return self.log_execute(*a, **b)
>> File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py",
>> line 1372, in log_execute
>> ret = self.cursor.execute(command, *a[1:], **b)
>> File "/usr/lib/python2.7/sqlite3/dbapi2.py", line 65, in convert_date
>> return datetime.date(*map(int, val.split("-")))
>> TypeError: Required argument 'month' (pos 2) not found
>>
>> I don't understand the reason..without this table all work perfec
>>
>>
>>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.