From: Stefan K. <pon...@ya...> - 2005-10-17 19:07:39
|
I am trying to put a pickle string into a VLArray using VLStringAtom. If the string is larger than a certain amount, I get an error like this ( the full error is below ) ValueError: Problems when converting the object '[snip]' to the encoding 'utf-8'. The error was: 'ascii' codec can't decode byte 0x86 in position 4: ordinal not in range(128) If it is a very short pickle string is works, but perhaps that is a red herring. Here is the example code.. from tables import * import cPickle fp = openFile( 'tmp.h5', 'w' ) vlarray = fp.createVLArray( fp.root, 'test', VLStringAtom()) vlarray.append( cPickle.dumps( ['aaa' * 130], 1 )) and here is the full error ( displaying the pickle string ) File "/apps/lib/python2.4/site-packages/tables/VLArray.py", line 327, in append raise ValueError, "Problems when converting the object '%s' to the encoding 'ut\ f-8'. The error was: %s" % (object, value) ValueError: Problems when converting the object ']q^AT\206^A^@^@aaaaaaaaaaaaaaaaaaa\ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaq^Ba.' to the encoding 'utf-8'. The error wa\ s: 'ascii' codec can't decode byte 0x86 in position 4: ordinal not in range(128) thanks, Stefan __________________________________ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs |