Title: undefined sys.prefix breaks initialization
Type: Severity: normal
Components: Core Versions: 2.5b0
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.

File name Uploaded Description Edit Remove boisgera, 2008-11-18.16:37:45
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 and do:

$ java Main
Exception in thread "main" java.lang.IllegalArgumentException: Cannot
create PyString from null!
        at org.python.core.PyString.<init>(
        at org.python.core.PyString.<init>(
        at org.python.core.Py.newString(
        at org.python.core.PySystemState.initialize(
        at org.python.core.PySystemState.initialize(
        at org.python.core.PySystemState.initialize(
        at Main.main(

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
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