Wednesday, September 20, 2006

Interesting discover about pys60 v1.3.1

To store a list of names in the database against a key, I use marshal.dumps(list). I got an interesting error while doing this:

>>> db['check'] = marshal.dumps(l)
Traceback (most recent call last):
File "", line 1, in ?
File "C:\system\libs\", line 145, in __setitem__
File "C:\system\libs\", line 100, in _dbset
self._execute(u"INSERT INTO data VALUES (%d,'%s','%s')"% (hash(key),sqlquote(key),sqlquote(value)))
UnicodeError: ASCII decoding error: ordinal not in range(128)

If the length of the list is 127, it stores fine in the database. Strange, huh? No! Doing, a db['check'] = unicode(marshal.dumps()) doesn't work either.

db['check'] = ';'.join(list)
list = db['check'].split(';')


cyke64 said...

Send your bug to

Broadband Sue said...

We all know that broadband suppliers advertise their speeds as "up to"
a certain level. But how fast is your actual connection? Now you can
find out with our broadbandspeed test, use the
checker below to find out. To get accurate results make sure that you
are not using your internet connection for anything else while the test
runs (it only takes a few seconds)