Ticket, do not understand why

10 views
Skip to first unread message

Kenneth Lundström

unread,
Jan 6, 2011, 7:34:36 AM1/6/11
to web...@googlegroups.com
What is wrong with this row:
bill_sub_items[item_id]['items'] = db(db.t_receipt_item.f_bill_item ==
item_id).select()

If I use the exact same row with an other query it works.

Apache, Mysql, mod_wsgi

Version
web2py� Version 1.91.6 (2011-01-03 17:55:14)
Python Python 2.6.5: /usr/bin/python
Traceback

Traceback (most recent call last):
File "/web2py/gluon/restricted.py", line 188, in restricted
exec ccode in environment
File "/web2py/applications/kenneths/controllers/billing.py", line 353,
in <module>
File "/web2py/gluon/globals.py", line 95, in <lambda>
self._caller = lambda f: f()
File "/web2py/gluon/tools.py", line 2297, in f
return action(*a, **b)
File "/web2py/applications/kenneths/controllers/billing.py", line 123,
in create_bill
bill_sub_items[item_id]['items'] = db(db.t_receipt_item.f_bill_item ==
item_id).select()
File "/web2py/gluon/dal.py", line 4507, in select
return self.db._adapter.select(self.query,fields,attributes)
File "/web2py/gluon/dal.py", line 1008, in select
return self.parse(rows,self._colnames)
File "/web2py/gluon/dal.py", line 1220, in parse
str(value)[:10].strip().split('-')]
ValueError: need more than 1 value to unpack

Massimo Di Pierro

unread,
Jan 15, 2011, 6:06:35 AM1/15/11
to web2py-users
You seem to have a field which is data according to web2py but string
according to the db. What is the model? Did you keep migrations
enabled?

On 6 tammi, 06:34, Kenneth Lundström <kenneth.t.lundst...@gmail.com>
wrote:
> What is wrong with this row:
> bill_sub_items[item_id]['items'] = db(db.t_receipt_item.f_bill_item ==
> item_id).select()
>
> If I use the exact same row with an other query it works.
>
> Apache, Mysql, mod_wsgi
>
> Version
> web2py Version 1.91.6 (2011-01-03 17:55:14)
Reply all
Reply to author
Forward
0 new messages