Issue2890

classification
Title: Jython fails to install and run in Win 10 Pro
Type: crash Severity: normal
Components: Core, Installer Versions: Jython 2.7.2
Milestone:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: jeff.allen, sherif
Priority: normal Keywords:

Created on 2020-05-22.16:25:47 by sherif, last changed 2020-05-24.11:26:51 by sherif.

Files
File name Uploaded Description Edit Remove
unnamed sherif, 2020-05-24.11:26:50
Messages
msg13056 (view) Author: Sherif (sherif) Date: 2020-05-22.16:25:46
I have tried to install in Win10 Pro with different Java versions:

jre-8u241-windows-i586.exe
jre-8u241-windows-x64.exe
jre-8u251-windows-i586.exe
jre-8u251-windows-x64.exe
jre-8u181-windows-i586.exe
jre-8u181-windows-x64.exe

PC: Intel i7-700, 2.80 Ghz, x64 bit CPU

C:\Jython>java -jar jython-installer-2.7.2.jar
Exception in thread "main" java.lang.ExceptionInInitializerError
        at org.python.core.PySystemState.<clinit>(PySystemState.java:73)
        at org.python.util.jython.main(jython.java:533)
Caused by: java.lang.IllegalArgumentException: Cannot create PyString with non-byte value
        at org.python.core.PyString.<init>(PyString.java:57)
        at org.python.core.PyString.<init>(PyString.java:70)
        at org.python.core.PyString.<init>(PyString.java:74)
        at org.python.core.Py.newString(Py.java:643)
        at org.python.core.PyJavaType.init(PyJavaType.java:543)
        at org.python.core.PyType$Registry.createType(PyType.java:477)
        at org.python.core.PyType$Registry.addFromClass(PyType.java:426)
        at org.python.core.PyType$Registry.resolveType(PyType.java:352)
        at org.python.core.PyType$Registry$1.computeValue(PyType.java:208)
        at org.python.core.PyType$Registry$1.computeValue(PyType.java:202)
        at java.lang.ClassValue.getFromHashMap(Unknown Source)
        at java.lang.ClassValue.getFromBackup(Unknown Source)
        at java.lang.ClassValue.get(Unknown Source)
        at org.python.core.PyType.fromClass(PyType.java:2137)
        at org.python.core.PyObject.<init>(PyObject.java:85)
        at org.python.core.PySingleton.<init>(PySingleton.java:9)
        at org.python.core.PyNotImplemented.<init>(PyNotImplemented.java:10)
        at org.python.core.Py.<clinit>(Py.java:66)
        ... 2 more


Could you please assist? Is this already fixed?

It works fine on Win 10 Enterprise.

Best regards,
Sherif
msg13058 (view) Author: Jeff Allen (jeff.allen) Date: 2020-05-23.07:10:22
Not fixed, and very odd, considering where it happens.

Normally with the message "Cannot create PyString with non-byte value" I'd suspect non-ascii paths or character coding on the host, but I think the string here should just be a class name. It's going wrong here:

https://github.com/jythontools/jython/blob/v2.7.2/src/org/python/core/PyJavaType.java#L543

and I wonder why Jython is doing stuff with reflected methods anyway? And why only on your machine?

It's not like installing on a Windows machine is anything new, and I don't see why this bit should be sensitive to anything in your particular environment. It looks like code that would execute identically whenever Jython starts on any machine.

Could the installer be a bad copy? You'd think it wouldn't run at all, in that case, but I'm stumped for now.
msg13060 (view) Author: Sherif (sherif) Date: 2020-05-24.11:26:51
Hi Jeff,

No, this is not the case. I have tried with more than one Jython
installation files of 2.7.2 and 2.7.1, all failed unfortunately.

I couldn't find the issue in the bug list so comment on this email thread.

I'd like to use Jython for Fiji-ImageJ platform but so far no luck.

Best regards,
Sherif

On Sat, May 23, 2020 at 10:10 AM Jeff Allen <report@bugs.jython.org> wrote:

>
> Jeff Allen <ja.py@farowl.co.uk> added the comment:
>
> Not fixed, and very odd, considering where it happens.
>
> Normally with the message "Cannot create PyString with non-byte value" I'd
> suspect non-ascii paths or character coding on the host, but I think the
> string here should just be a class name. It's going wrong here:
>
>
> https://github.com/jythontools/jython/blob/v2.7.2/src/org/python/core/PyJavaType.java#L543
>
> and I wonder why Jython is doing stuff with reflected methods anyway? And
> why only on your machine?
>
> It's not like installing on a Windows machine is anything new, and I don't
> see why this bit should be sensitive to anything in your particular
> environment. It looks like code that would execute identically whenever
> Jython starts on any machine.
>
> Could the installer be a bad copy? You'd think it wouldn't run at all, in
> that case, but I'm stumped for now.
>
> ----------
> nosy: +jeff.allen
> priority:  -> normal
>
> _______________________________________
> Jython tracker <report@bugs.jython.org>
> <https://bugs.jython.org/issue2890>
> _______________________________________
>
History
Date User Action Args
2020-05-24 11:26:51sherifsetfiles: + unnamed
messages: + msg13060
2020-05-23 07:10:22jeff.allensetpriority: normal
nosy: + jeff.allen
messages: + msg13058
2020-05-22 16:25:47sherifcreate