problem with pickle.loads

Yusuf Lüle yusuf.luele at bov.de
Tue Dec 19 05:37:30 EST 2000


Hello,
I have a problem with serializing an object.
In a python script I create an object (an instance of a class) and call the
pickle.dumps function
(serobj = pickle.dumps(obj)).
Then I put this serialized result (serobj) in an html page in an hidden
input box and sent it  to the next python script.
The second python script now reads the serialzed object from the environment
of the webserver.
(I use os.environ["QUERY_STRING"], parsing and decoding the part I need).
After that I try to unserialize the result with the function obj =
pickle.loads(serobj).
Python throws an error:
 File "second.py", line 58, in ?
    obj= pickle.loads(serobj)
  File "/usr/lib/python1.5/pickle.py", line 830, in loads
    return Unpickler(file).load()
  File "/usr/lib/python1.5/pickle.py", line 495, in load
    dispatch[key](self)
  File "/usr/lib/python1.5/pickle.py", line 612, in load_inst
    klass = self.find_class(module, name)
  File "/usr/lib/python1.5/pickle.py", line 669, in find_class
    raise SystemError, \

Can someone help me?







More information about the Python-list mailing list