--
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 web2py+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
uri: mysql://root:password@localhost/project
# -*- coding: utf-8 -*-
db.define_table('items',
Field('parentid','integer'),
Field('itemtypeid','integer'),
Field('name','string'))
Traceback (most recent call last):
File "C:\dev\web2py\gluon\restricted.py", line 227, in restricted
exec ccode in environment
File "C:/dev/web2py/applications/forum/models/models.py", line 5, in <module>
Field('name','string'))
File "C:\dev\web2py\gluon\packages\dal\pydal\base.py", line 819, in define_table
raise SyntaxError('table already defined: %s' % tablename)
SyntaxError: table already defined: items
sqlite3 applications/forum/databases/storage.sqlite
.tables
I haven't figured out how to get an interactive console on my windows machine
thanks to Yoel pointing out that "item" works I just changed the table name to "item" instead of "items" but I would really like to see this issue fixed or at least explained. it's either a bug or a reserved word that isn't being detected correctly.Thanks all for the help so far.
so it's just something in the web2py code base that has a problem with the word "items" as a database table name.
yes. Items is a reserved keyword for this reason.