Message12552

Author filip.drozdowski
Recipients adamburke, filip.drozdowski, stefan.richthofer
Date 2019-05-30.21:29:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1559251741.35.0.815199165487.issue2776@roundup.psfhosted.org>
In-reply-to
Content
Ok, I looked at the stack trace I posted earlier more in detail. I stopped the application right before it threw NotSerializableException. When writing to ObjectOutputStream (out.writeObject(interpreter.getSystemState())), Java is trying to serialize the system state's "__dict__" property (sys.__dict__). The first item in the "sys.__dict__" is function "getCurrentWorkingDir" which is of type PyReflectedFunction. Its property called "__module__" is of type PyReflectedField. "__module__" has a property called "field" which is of type "class java.lang.reflect.Field". That's where the serialization fails. 

In short, the problematic field is 'interpreter.getSystemState().__dict__.__getitem__("getCurrentWorkingDir").__module__.field' which is of type java.lang.reflect.Field, and it causes serialization to fail.
History
Date User Action Args
2019-05-30 21:29:01filip.drozdowskisetmessageid: <1559251741.35.0.815199165487.issue2776@roundup.psfhosted.org>
2019-05-30 21:29:01filip.drozdowskisetrecipients: + filip.drozdowski, stefan.richthofer, adamburke
2019-05-30 21:29:01filip.drozdowskilinkissue2776 messages
2019-05-30 21:29:00filip.drozdowskicreate