Re: [web2py] Re: Error when executing select command

2010-08-09 Thread Kenneth Lundström
I finally found what the problem is. I have defined the table as db.Field('starts', 'time', requires=IS_TIME()), db.Field('ends', 'time', requires=IS_TIME())) and when a user fills the form I have as defaults starts = 0:00:00 and ends = 24:00:00 the ends value is the problem. The last

[web2py] Re: Error when executing select command

2010-08-09 Thread mdipierro
This is still an option: On Aug 9, 7:45 am, mdipierro wrote: > You have the problem described here: > > http://web2py.com/book/default/chapter/06#Fixing-Broken-Migrations > > The first one of them. > > On Aug 9, 6:31 am, Kenneth wrote: > > > I don´t understand what am I doing wrong. > > > comman

[web2py] Re: Error when executing select command

2010-08-09 Thread Martin.Mulone
Sorry my mistake, now i view your definition db.define_table('troop_place_day', db.Field('troop_place', db.troop_place, required=True), db.Field('day', 'integer'), db.Field('starts', 'time', requires=IS_TIME()), db.Field('ends', 'time', requires=IS_TIME())) 'day' you have as an i

[web2py] Re: Error when executing select command

2010-08-09 Thread Martin.Mulone
because you define in db as time, and need to be datetime. I think On Aug 9, 9:51 am, Kenneth Lundström wrote: > Now I�m getting: > > Traceback(most recent call last): >    File"gluon/restricted.py",line178,inrestricted >      execccodeinenvironment >     > File"/data/domains/exp-kal.nudata.fi/

Re: [web2py] Re: Error when executing select command

2010-08-09 Thread Kenneth Lundström
Now I´m getting: Traceback(most recent call last): File"gluon/restricted.py",line178,inrestricted execccodeinenvironment File"/data/domains/exp-kal.nudata.fi/applications/init/controllers/troop.py" ,line2195,in Fi

[web2py] Re: Error when executing select command

2010-08-09 Thread mdipierro
Ignore my response. Martin is right. On Aug 9, 7:45 am, mdipierro wrote: > You have the problem described here: > > http://web2py.com/book/default/chapter/06#Fixing-Broken-Migrations > > The first one of them. > > On Aug 9, 6:31 am, Kenneth wrote: > > > I don´t understand what am I doing wrong.

[web2py] Re: Error when executing select command

2010-08-09 Thread mdipierro
You have the problem described here: http://web2py.com/book/default/chapter/06#Fixing-Broken-Migrations The first one of them. On Aug 9, 6:31 am, Kenneth wrote: > I don´t understand what am I doing wrong. > > command: > days = db((db.troop_place_day.day == > 2)&(db.troop_place_day.troop_place =

[web2py] Re: Error when executing select command

2010-08-09 Thread Martin.Mulone
change with: db.troop_place_day.day()==2 if I not wrong On Aug 9, 8:31 am, Kenneth wrote: > I don´t understand what am I doing wrong. > > command: > days = db((db.troop_place_day.day == > 2)&(db.troop_place_day.troop_place == 21)).select() > > gives this error: > > Traceback (most recent call las