This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: "about" button in MacOS caused an error
Type: behavior Stage:
Components: macOS Versions: Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Baozhen Chen, ned.deily, ronaldoussoren, terry.reedy
Priority: normal Keywords:

Created on 2020-07-08 06:05 by Baozhen Chen, last changed 2022-04-11 14:59 by admin.

Messages (5)
msg373278 - (view) Author: Baozhen Chen (Baozhen Chen) Date: 2020-07-08 06:05
when clicking the MacOS menubar-File-About Python, it appears

>>> can't invoke "tk_messageBox" command: application has been destroyed
    while executing
"tk_messageBox -icon info -type ok -title [mc "About Widget Demo"]  -message [mc "Tk widget demonstration application"] -detail  "[mc "Copyright \u00a9..."
    (procedure "tkAboutDialog" line 2)
    invoked from within
"tkAboutDialog"
msg373291 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2020-07-08 08:35
Please say exactly how you reproduced this behavior.  Please paste the results of running the following command from a terminal window:

python3.7 -m test.pythoninfo

replacing python3.7 with whatever you use to start the python that fails.
msg373507 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-07-11 03:01
Messages like this are an occasional nuisance when shutting down a tkinter app started in a terminal/console window.  I have gone to a lot of effort to suppress than in IDLE GUI tests so that other developers do not suffer the noise or puzzlement of thinking that there maybe was a test failure.

I can get them now *occasionally* if I start IDLE from a Windows console, open multiple windows, and close by right clicking the toolbar icon and selecting "Close all Windows" instead of closing properly by closing each window or selecting File => Exit.  I consider trying to fix this shutdown buglet to be low priority.  

When starting IDLE from an IDLE icon, any such messages go to /dev/NULL. 

After experimenting, I believe Baozhen started IDLE from Terminal with 'python3 -m idlelib'.  The top menu then has second entry "Python" instead of "IDLE" with first item "About Python" instead of "About IDLE".  But it brings up the "About IDLE" tk dialog box.  I also suspect  there was some shutdown action, so we must know every user action needed to reproduce the issue, and then see if it occurs in 3.8 or later. 

Ned, when I run 3.9 test.pythoninfo, I am asked to install gcc tools and maybe xcode.  Is this expected?
msg373517 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2020-07-11 06:32
Terry, based on the error message provided, i.e. "About Widget Demo", I assumed that the poster was not using IDLE here. But we can't tell without more input.

"when I run 3.9 test.pythoninfo, I am asked to install gcc tools and maybe xcode.  Is this expected?"

When doing Python development on macOS, you will need to have the Apple-supplied development tools installed and ones appropriate for the macOS release. As the Developer's Guide explains (https://devguide.python.org/setup/#macos-and-os-x), the necessary tools are available if you install the full Xcode development environment from the Mac App Store but that's a big download and most of it is not necessary for just cpython work. If you haven't already downloaded Xcode, then the first time you (or, in this case test.pythoninfo) try to use one of the development tools from the terminal shell command line, macOS offers to download and install a lightweight subset of what's available in Xcode, called the Command Line Tools.  You can also force the installation of the CLT by using "xcode-select --install". Once the CLT are installed, they are normally automatically updated as needed by the macOS Software Update process.
msg373523 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-07-11 13:33
You're right.  "python3.9 -m tkinter" runs the tkinter widget demo.  And python >= About python brings up 'about tkinter' window.  I just deleted 3.7 so I cannot easily test.  3.8 works also.
History
Date User Action Args
2022-04-11 14:59:33adminsetgithub: 85408
2020-07-11 13:33:41terry.reedysetmessages: + msg373523
2020-07-11 06:32:36ned.deilysetmessages: + msg373517
2020-07-11 03:01:16terry.reedysetnosy: + terry.reedy
messages: + msg373507
2020-07-08 08:35:46ned.deilysetmessages: + msg373291
2020-07-08 06:05:16Baozhen Chencreate