Message11457

Author stefan.richthofer
Recipients stefan.richthofer, zyasoft
Date 2017-07-02.15:39:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1499009985.41.0.135693104451.issue2602@psf.upfronthosting.co.za>
In-reply-to
Content
I was pointed to this issue in JyNI context, but it seems to be JyNI-unrelated.
On OSX macOS Sierra 10.12.5 / Oracle Java 1.8.0_131 / Jython 2.7.1 RC2/RC3/Final, using the terminal:

[ERROR] Failed to construct terminal; falling back to unsupported
java.lang.NumberFormatException: For input string: "0x100"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.valueOf(Integer.java:766)
at org.python.jline.internal.InfoCmp.parseInfoCmp(InfoCmp.java:59)
at org.python.jline.UnixTerminal.parseInfoCmp(UnixTerminal.java:242)
at org.python.jline.UnixTerminal.<init>(UnixTerminal.java:65)
at org.python.jline.UnixTerminal.<init>(UnixTerminal.java:50)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.python.jline.TerminalFactory.getFlavor(TerminalFactory.java:211)
at org.python.jline.TerminalFactory.create(TerminalFactory.java:102)
at org.python.jline.TerminalFactory.get(TerminalFactory.java:186)
at org.python.jline.TerminalFactory.get(TerminalFactory.java:192)
at org.python.jline.console.ConsoleReader.<init>(ConsoleReader.java:243)
at org.python.util.JLineConsole.install(JLineConsole.java:107)
at org.python.core.Py.installConsole(Py.java:1745)
at org.python.core.PySystemState.initConsole(PySystemState.java:1269)
at org.python.core.PySystemState.doInitialize(PySystemState.java:1119)
at org.python.core.PySystemState.initialize(PySystemState.java:1033)
at org.python.core.PySystemState.initialize(PySystemState.java:989)
at org.python.core.PySystemState.initialize(PySystemState.java:984)
at org.python.util.jython.run(jython.java:263)
at org.python.util.jython.main(jython.java:142)

(Not showing up in xcode IDE.)


The issue is known in different context:
https://stackoverflow.com/a/44329833

A suggested workaround is to set the environment variable TERM to a dfifferent value than "xterm-256color".
(Apparrently, newer ncurses displays 256 as 0x100 for better readability.)

This is said to be fixed in recent JLine2. So maybe another update of JLine2 can solve this issue in Jython.
History
Date User Action Args
2017-07-02 15:39:45stefan.richthofersetrecipients: + stefan.richthofer, zyasoft
2017-07-02 15:39:45stefan.richthofersetmessageid: <1499009985.41.0.135693104451.issue2602@psf.upfronthosting.co.za>
2017-07-02 15:39:45stefan.richthoferlinkissue2602 messages
2017-07-02 15:39:44stefan.richthofercreate