I am having a similar problem. I did an insert using crud.create and it went through, but now I get the error described above whenever I do anything related to tht table... I tried this, but my notnull constraint got in the way so I tried:
db(db.youtable.id>0).update(thedatetimefield=datetime.datetime.utcnow()) and now I'm getting this traceback: Traceback (most recent call last): File "gluon/main.py", line 564, in wsgibase File "gluon/dal.py", line 529, in close_all_instances File "gluon/dal.py", line 509, in close File "gluon/dal.py", line 1652, in commit OperationalError: SQL logic error or missing database Any idea what's going on? On Sunday, April 5, 2009 10:01:13 PM UTC-7, mdipierro wrote: > > Let me guess... you changed a field from 'string' to 'datetime' using > sqlite? sqlite does not enforces field types hence it let you do the > migration even if there was data in there that is not of type > 'datetime'. You need to clean up that column. > > In your model do this > > db(db.youtable.id>0).update(thedatetimefield=None) > > run appadmin once than remove the above line. > > Massimo > > > > On Apr 5, 9:10 pm, "web2py <<<at>>> technicalbloke.com" > <technicalbl...@googlemail.com> wrote: > > Hi, > > > > Somehow (don't ask me how!) I've managed to bork my database :-/ > > Appadmin let's me see all my tables except one, when I click on it's > > name it spews the message below. I don't care about the data inside, > > I'd just like to have my database rebuilt from the model so what's the > > best way to do that? > > > > db.my_table.truncate? > > db.my_table.drop? > > delete the contents of the 'databases' folder? > > > > Traceback (most recent call last): > > File "/rahrahrah/web2py/gluon/restricted.py", line 98, in restricted > > exec ccode in environment > > File "/rahrahrah/web2py/applications/tcrm/views/appadmin.html", line > > 102, in <module> > > File "/rahrahrah/web2py/gluon/sqlhtml.py", line 605, in __init__ > > for (rc, record) in enumerate(sqlrows): > > File "/rahrahrah/web2py/gluon/sql.py", line 2127, in __iter__ > > yield self[i] > > File "/rahrahrah/web2py/gluon/sql.py", line 2082, in __getitem__ > > str(value)[:10].strip().split('-')] > > ValueError: need more than 1 value to unpack > > > > Cheers, > > > > Roger. --