[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Brian Boatright
I always delete the database in mysql and create it again (no tables). Then delete all the files in the database folder. When it runs again, as far as I know, everything is clean. My connection string is just a simple > uri: mysql://root:password@localhost/project and I don't see anything e

[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Brian Boatright
just to be sure it wasn't some odd cache issue or something I missed I created a brand new simple app in the admin called "forum" and created a new model file models.py and created a very basic items table. # -*- coding: utf-8 -*- > db.define_table('items', > Field('parentid','in

[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Dave S
On Thursday, September 1, 2016 at 3:42:59 PM UTC-7, Brian Boatright wrote: > > just to be sure it wasn't some odd cache issue or something I missed I > created a brand new simple app in the admin called "forum" and created a > new model file models.py and created a very basic items table. > > #

[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Brian Boatright
I haven't figured out how to get an interactive console on my windows machine BUT I did upload the package to pythonanywhere and used their bash shell. The only tables created were the standard authentication tables.

[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Dave S
On Thursday, September 1, 2016 at 4:09:13 PM UTC-7, Brian Boatright wrote: > > I haven't figured out how to get an interactive console on my windows > machine > -command > BUT I did upload the package to pythonanywhere and used their bash shell. > > The only tables created were the standar

[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Brian Boatright
indeed! I'm new to web2py and python. if I knew a bit more I would try to edit the base.py function for define_table that might give some more details. the error stops right on line 819 of base.py. would be good to have self.tables print out as part of the error or even directly on the page. -

[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Brian Boatright
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. -- Resourc

[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Dave S
On Thursday, September 1, 2016 at 5:20:36 PM UTC-7, Brian Boatright wrote: > > 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

[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-01 Thread Brian Boatright
so it's just something in the web2py code base that has a problem with the word "items" as a database table name. -- 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 Iss

[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-02 Thread Dave S
On Thursday, September 1, 2016 at 6:46:10 PM UTC-7, Brian Boatright wrote: > > so it's just something in the web2py code base that has a problem with the > word "items" as a database table name. > I can confirm this behavior. My investigation seems to show that DAL has a method called "item

[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-06 Thread Massimo Di Pierro
yes. Items is a reserved keyword for this reason. On Friday, 2 September 2016 05:02:52 UTC-5, Dave S wrote: > > > > On Thursday, September 1, 2016 at 6:46:10 PM UTC-7, Brian Boatright wrote: >> >> so it's just something in the web2py code base that has a problem with >> the word "items" as a data

[web2py] Re: Cannot Create Table Named "Items" - Already Exists

2016-09-07 Thread Dave S
On Tuesday, September 6, 2016 at 7:37:54 AM UTC-7, Massimo Di Pierro wrote: > > yes. Items is a reserved keyword for this reason. > The trick is knowing which keywords are reserved, before trying to use them and getting an error message :-) /dps > > On Friday, 2 September 2016 05:02:52 UTC