what db engine are you using ?
Il giorno martedì 20 marzo 2012 21:55:58 UTC+1, backseat ha scritto: > > I've hit an error (web2py bug?) in Niphlod's well-explained example. > > I *was* running web2py.1.99.4, which gave this: > > >>> duration=(db.t_periods.f_period_end.seconds() - > >>> db.t_periods.f_period_start.seconds()).sum() > >>> result=db(db.t_periods>0).select(db.t_periods.id > ,duration,groupby=db.t_periods.f_task_id) > Traceback (most recent call last): > File "<console>", line 1, in <module> > File "/home/kae/hg/kae/web2py.1.99.4.pytrack2/gluon/dal.py", line 6333, > in select return self.db._adapter.select(self.query,fields,attributes) > File "/home/kae/hg/kae/web2py.1.99.4.pytrack2/gluon/dal.py", line 1274, > in select sql = self._select(query, fields, attributes) > File "/home/kae/hg/kae/web2py.1.99.4.pytrack2/gluon/dal.py", line 1672, > in _select sql = super(SQLiteAdapter, self)._select(query, fields, > attributes) File "/home/kae/hg/kae/web2py.1.99.4.pytrack2/gluon/dal.py", > line 1155, in _select if query and not query.ignore_common_filters: > AttributeError: 'bool' object has no attribute 'ignore_common_filters' > >>> > > Some Googling suggested this problem was fixed after 1.99.4 was released, > so I've just downloaded 1.99.7, which gives: > > >>> durations=(db.t_periods.f_period_end.seconds() > -db.t_periods.f_period_start.seconds()).sum() > > >>> result=db(db.t_periods>0).select(db.t_periods.id > ,durations,groupby=db.t_periods.f_task_id) > Traceback (most recent call last): > File "<console>", line 1, in <module> > File "/home/kae/hg/kae/web2py.1.99.7.pytrack2/gluon/dal.py", line 7578, > in select return adapter.select(self.query,fields,attributes) > File "/home/kae/hg/kae/web2py.1.99.7.pytrack2/gluon/dal.py", line 1315, > in select rows = response(sql) > File "/home/kae/hg/kae/web2py.1.99.7.pytrack2/gluon/dal.py", line 1305, > in response self.execute(sql) > File "/home/kae/hg/kae/web2py.1.99.7.pytrack2/gluon/dal.py", line 1392, > in execute return self.log_execute(*a, **b) > File "/home/kae/hg/kae/web2py.1.99.7.pytrack2/gluon/dal.py", line 1386, > in log_execute ret = self.cursor.execute(*a, **b) > OperationalError: no such column: True > >>> > > Is this a web2py bug, or am I doing something wrong? > -- > "You can have everything in life you want if you help enough other people > get what they want" - Zig Ziglar. > > Who did you help today? > >