Message3786

Author boisgera
Recipients boisgera, pjenvey
Date 2008-11-18.16:37:43
SpamBayes Score 1.4662308e-08
Marked as misclassified No
Message-id <1227026266.46.0.654016506171.issue1173@psf.upfronthosting.co.za>
In-reply-to
Content
An error was introduced by revision 5553 when the PySystemState prefix
was made a PyObject instead of a String. 

To reproduce the error, compiled attached Main.java and do:

$ java Main
Exception in thread "main" java.lang.IllegalArgumentException: Cannot
create PyString from null!
        at org.python.core.PyString.<init>(PyString.java:32)
        at org.python.core.PyString.<init>(PyString.java:39)
        at org.python.core.Py.newString(Py.java:576)
        at
org.python.core.PySystemState.initRegistry(PySystemState.java:462)
        at org.python.core.PySystemState.initialize(PySystemState.java:547)
        at org.python.core.PySystemState.initialize(PySystemState.java:528)
        at org.python.core.PySystemState.initialize(PySystemState.java:520)
        at Main.main(Main.java:9)

The code snippet 'Py.newString(prefix)' throws an error when prefix is
null and many constructs in the code hint that a null value for prefix
(or PyNone now) should be considered correct.
History
Date User Action Args
2008-11-18 16:37:46boisgerasetrecipients: + boisgera, pjenvey
2008-11-18 16:37:46boisgerasetmessageid: <1227026266.46.0.654016506171.issue1173@psf.upfronthosting.co.za>
2008-11-18 16:37:46boisgeralinkissue1173 messages
2008-11-18 16:37:45boisgeracreate