ValueError: insecure string pickle

Uncategorized June 1st, 2010

Did you find yourself with the error saying ” insecure string pickle”  when you tried to unpickle a long pickled object?  The following is the type of traceback that you might get.

File “/usr/lib/python2.6/pickle.py”, line 1370, in load
return Unpickler(file).load()
File “/usr/lib/python2.6/pickle.py”, line 858, in load
dispatch[key](self)
File “/usr/lib/python2.6/pickle.py”, line 966, in load_string
raise ValueError, “insecure string pickle”
ValueError: insecure string pickle

Think back !! Did you pickle the object on a windows machine long back ? or did you receive the code that once pickled the object on a windows machine ? Great. One of the reasons for this error is because of the difference in newline termination by windows and linux machines.

Soluion: Use dos2unix  or fromdos commands to convert the pickled file into a unix format and then try unpickling it. !!

Python Video Tutorials

Uncategorized December 6th, 2009

Getting started with python programming is really easy given the number of tutorials available and the brilliant python documentation. Yet, it is very typical for someone to look for python video tutorials as it just makes the learning even more easier. here is a wonderful series of video tutorials that takes you from being a novice to another level of novice in python programming. It is a wonderful start for someone who is just stepping into programming for the first time.