-----BEGIN PGP SIGNED MESSAGE-----
Joshua Rothenberg wrote:
> Well having made that change and tested various things extensively I
still have absolutely no clue what's going on, but now when I try to
read the img data it tells me "Error: Incorrect padding"... It looks
like, among other things, \n's are being turned into \\n's and not being
converted back properly (this is from using short strings instead of
full images; everything just seems to get garbled with big images).. And
it still works properly under PostgreSQL. I have no idea if the problem
is with my code, SQLObject's SQLite interface, PySQLite, or SQLite.
Although since it *does* work in other database systems its probably one
of the latter three. Hasn't anyone had this problem before?
> Joshua Rothenberg
I had the same problem some time ago. Make your getter function
# This list is from SQLObject/Converters.py.
sqlStringReplace = [
('\\', '\\\\'), ('\'', '\\\''), ('\000', '\\0'),
('\b', '\\b'), ('\n', '\\n'), ('\r', '\\r'), ('\t',
for final, original in sqlStringReplace:
val = val.replace(original, final)
# Using pickle instead of base64.
# I don't think it makes a difference.
from cPickle import loads
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----