Issue1173

classification
Title: undefined sys.prefix breaks initialization
Type: Severity: normal
Components: Core Versions: 2.5b0
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: pjenvey Nosy List: boisgera, pjenvey
Priority: Keywords:

Created on 2008-11-18.16:37:46 by boisgera, last changed 2008-11-21.02:00:21 by pjenvey.

Files
File name Uploaded Description Edit Remove
Main.java boisgera, 2008-11-18.16:37:45
Messages
msg3786 (view) Author: (boisgera) Date: 2008-11-18.16:37:43
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.
msg3798 (view) Author: Philip Jenvey (pjenvey) Date: 2008-11-21.02:00:20
fixed in r5596, thanks
History
Date User Action Args
2008-11-21 02:00:21pjenveysetstatus: open -> closed
resolution: fixed
messages: + msg3798
2008-11-20 18:19:55pjenveysetassignee: pjenvey
2008-11-18 16:37:46boisgeracreate