Issue 31142: python shell crashed while input quotes in print() (original) (raw)

Created on 2017-08-08 12:09 by py78py90py, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
crashlog.txt py78py90py,2017-08-09 14:05 IDLE crash log
Messages (6)
msg299909 - (view) Author: (py78py90py) Date: 2017-08-08 12:09
I have downloaded python 3.6 into MacOSX system. Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Then I opened the IDLE and try to input some sentences. I inputed "print()", then input single quote in print. But the IDLE crashed.
msg299956 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2017-08-09 00:27
I'm afraid your error report isn't completely clear. What do you mean "input single quote in print"? Do you mean this? print(') You say IDLE "crashed". What do you mean? Do you mean the IDLE application put up an error message and then disappeared? If so, what was the error message? If IDLE said something like: SyntaxError: EOL while scanning string literal that's perfectly normal. That's because you haven't written a valid string, you need to quote the single quote: print("'").
msg300010 - (view) Author: (py78py90py) Date: 2017-08-09 14:05
Sorry for the incomplete information. I have inputed following line: print(") IDLE crashed. I also input following line: print(') IDLE also crashed. I have uploaded the crash log.
msg300030 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-08-09 19:21
There is still something you left out. Entering either print(") or print(') at either a shell prompt or in a file and running the file should result in "SyntaxError: EOL while scanning string literal", as Steven said. Ditto for eval("print(')") or eval('print(")'). The error comes from Python's compile() function. The result *should* be the same on all systems. This is feature, neither a crash nor a bug. So my first inclination was to close this as 'Not a bug'. But getting a system crash log is usually a bug when running Python code. From my reading of Mac's crash log, what crashed is not IDLE but Python running _tkinter calling tcl running tk calling OSX's CoreFoundation which raised NSRangeException. How did you bypass compile()? Where did you get the Python that you installed? If from python.org, did you pay attention to https://www.python.org/download/mac/tcltk/ and install a tcl/tk that works? If not, not our bug. Ned and Serhiy: can we patch _tkinter on Mac to refuse to run with the buggy Apple tcl/tk? Or at least pop up a Warning box that says to not bug us when it crashes?
msg300069 - (view) Author: (py78py90py) Date: 2017-08-10 10:33
I downloaded python from www.python.org. And I think I have tcl/tk installed. Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "copyright", "credits" or "license()" for more information. >>> WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable. Visit http://www.python.org/download/mac/tcltk/ for current information. I am trying to use the recommended tcltk version.
msg300186 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2017-08-12 03:23
Note that the web page states you need to use Tcl/Tk 8.5.18, and not 8.6.x. Both are available from ActiveState here: https://www.activestate.com/activetcl/downloads Try installing 8.5.18 (you don't need to uninstall 8.6.x) and your crashes should go away.
History
Date User Action Args
2022-04-11 14:58:49 admin set github: 75325
2017-08-12 03:23:59 ned.deily set status: open -> closedresolution: third partymessages: + stage: resolved
2017-08-10 10:33:01 py78py90py set messages: +
2017-08-10 04:52:50 terry.reedy set assignee: terry.reedy ->
2017-08-09 19:21:41 terry.reedy set nosy: + ned.deily, serhiy.storchaka, ronaldoussorenmessages: + components: + macOS, Tkintertype: crash
2017-08-09 14:05:31 py78py90py set files: + crashlog.txtmessages: +
2017-08-09 00:27:16 steven.daprano set nosy: + steven.daprano, terry.reedymessages: + assignee: terry.reedycomponents: + IDLE, - Demos and Tools
2017-08-08 12:09:52 py78py90py create