ashim
ashim

Reputation: 25570

web2py. no such table error

I have an error no such table: mytable, even though it is defined in models/tables.py. I use sqlite. Interesting enough, if I go to admin panel -> my app -> database administration then I see a link mytable, however when I click on it then I get no such table: mytable. I don't know how to debug such error? Any ideas?

Upvotes: 2

Views: 1143

Answers (1)

John La Rooy
John La Rooy

Reputation: 304355

web2py keeps the structure it thinks the table has in a separate file. If someone has manually dropped the table, web2py will still think it exists, but of course you get an error when you try to actually use the table

Look for the *.mytable.table file in the databases directory

Upvotes: 3

Related Questions