|
From: Stefan R. <re...@bu...> - 2017-07-02 15:39:53
|
New submission from Stefan Richthofer: 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. ---------- messages: 11457 milestone: Jython 2.7.2 nosy: stefan.richthofer, zyasoft priority: normal severity: normal status: open title: NumberFormatException in terminal on OSX 10.12.5 (ncurses related) type: behaviour _______________________________________ Jython tracker <re...@bu...> <http://bugs.jython.org/issue2602> _______________________________________ |