Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

except KeyError: print("this was not a key error?")

2 views
Skip to first unread message

gert

unread,
Oct 10, 2009, 7:59:30 PM10/10/09
to
http://code.google.com/p/appwsgi/source/browse/appwsgi/wsgi/order.wsgi

I screwed up some sql statement

INSERT INTO orders (pid,uid,bid,time) VALUES (?,?,2,DATETIME('NOW'))",
(v['pid']),s.UID)

bid does not exist anymore, but why does the KeyError exception occur
when only my sql statement is wrong ?

Michel Alexandre Salim

unread,
Oct 11, 2009, 1:48:45 AM10/11/09
to

Sure it's not from this line?

def stats2(db,v,s): db.execute("SELECT * FROM orders WHERE bid=? AND
uid=?",(v['bid'],s.UID))

It references v['bid']

gert

unread,
Oct 11, 2009, 9:23:50 AM10/11/09
to
On Oct 11, 7:48 am, Michel Alexandre Salim

Hmm that is also a key error :)

0 new messages