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 <kenneth.t.lundst...@gmail.com> 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 last):
>   File "gluon/restricted.py", line 178, in restricted
>     exec ccode in environment
>   File "/data/domains/exp-kal.nudata.fi/applications/init/controllers/
> troop.py", line 2195, in <module>
>   File "gluon/globals.py", line 96, in <lambda>
>     self._caller = lambda f: f()
>   File "gluon/tools.py", line 2219, in f
>     return action(*a, **b)
>   File "/data/domains/exp-kal.nudata.fi/applications/init/controllers/
> troop.py", line 985, in edit_saleplace
>     days = db((db.troop_place_day.day ==
> 2)&(db.troop_place_day.troop_place == 21)).select()
>   File "gluon/sql.py", line 3162, in select
>     return self.parse(db,rows,self.colnames,SetClass=Set)
>   File "gluon/sql.py", line 3231, in parse
>     str(value)[:8].strip().split(':')[:3]]
> ValueError: invalid literal for int() with base 10: '1 day, 0'
>
> My model for that table looks like this:
>
> 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()))
>
> This error just started coming maybe an hour ago. I just deleted all
> records from the record and same thing continues.
>
> I really don't understand what is happening.
>
> Kenneth

Reply via email to