Python — Pickle KeyError ‘\n’ Jul 27 2010July 27, 2010 I was getting this error when I was storing a UTF8 pickle in a database text field. I fixed it by base64.b64encode(pickle.dumps(blah)), and saving that to the DB. Share this: Share on Facebook (Opens in new window) Facebook Email a link to a friend (Opens in new window) Email Like Loading... Related Published by Yuji Tomita I'm a human person. I excel in crafting holistic technology solutions that extend beyond a narrow technical scope. View all posts by Yuji Tomita