i have a large dictionary I’d like to save. I have pickled it using cPickle.dumps and saved the result into a TextField. When trying to retrieve it (cPicle.loads) i get the following error:
loads() argument 1 must be string, not unicode
Does anybody have any experience in serializing python objects and storing them in a DB using Django? Thanks in advance.
The best advice you’re probably going to get is to use json rather than pickle not only for security reasons, but also because it’s simply a string which can easily be read and modified if necessary.
edit: in response to the actual problem you’re having –