Issue222798
Created on 2000-11-18.18:52:57 by bckfnn, last changed 2000-11-18.22:04:02 by bckfnn.
Messages | |||
---|---|---|---|
msg33 (view) | Author: Finn Bock (bckfnn) | Date: 2000-11-18.18:52:57 | |
A java stacktrace result when serializing a python subclass. It seems that a bit too much of the jpython runtime is been serialized. ------------------ FILE: test156.py ------------------ import sys from java import io from java.awt import Panel class MyPanel (Panel): pass def serialize_object (obj, filename): print "serializing", obj, "to", filename file = io.FileOutputStream (filename) objstream = io.ObjectOutputStream (file) objstream.writeObject (obj) objstream.close() ; file.close() print "done" def unserialize_object (filename): print "reading serialized object from", filename file = io.FileInputStream (filename) objstream = io.ObjectInputStream (file) obj = objstream.readObject () objstream.close() ; file.close() print "unserialized", obj filename = 'test156.ser' p = MyPanel () serialize_object (p, filename) unserialize_object (filename) ------------------ END ------------------ Partial stack trace: serializing <__main__.MyPanel instance at 40215538> to test156.ser Traceback (innermost last): File "test156.py", line 44, in ? File "test156.py", line 29, in serialize_object java.io.NotSerializableException: org.python.core.PyFile$TextWrapper at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:845) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342) |
|||
msg34 (view) | Author: Finn Bock (bckfnn) | Date: 2000-11-18.22:04:02 | |
This is the same situation as bug 122791. The same comment apply. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2000-11-18 18:52:57 | bckfnn | create |
Supported by Python Software Foundation,
Powered by Roundup