homepage

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: IDLE 3.8.2 on MacOS 10.15.3 Launches to Black Windows
Type: behavior Stage: resolved
Components: macOS, Tkinter Versions: Python 3.8
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: Jacin Ferreira, erlendaasland, ned.deily, ronaldoussoren, terry.reedy
Priority: normal Keywords:

Created on 2020年03月04日 07:53 by Jacin Ferreira, last changed 2022年04月11日 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
Screen Shot 2020年03月03日 at 11.51.21 PM.png Jacin Ferreira, 2020年03月04日 07:53
Screen Shot 2020年03月03日 at 11.51.36 PM.png Jacin Ferreira, 2020年03月04日 07:53
test.pythoninfo.output.log Jacin Ferreira, 2020年03月04日 22:42
Screen Shot 2020年03月04日 at 2.42.10 PM.png Jacin Ferreira, 2020年03月04日 22:42
Screen Shot 2020年03月04日 at 7.39.02 PM.png Jacin Ferreira, 2020年03月05日 03:39
Messages (13)
msg363334 - (view) Author: Jacin Ferreira (Jacin Ferreira) Date: 2020年03月04日 07:53
0) MacBook Pro 13" running MacOS 10.15.3 Catalina
1) Fresh install of Python 3.8.2 from python.org
2) Launch IDLE
3) Observe Python 3.8.2 Shell
4) Goto File Menu
5) Select Preferences
6) Observe Preferences
EXPECTED RESULTS
Windows should show text and are usable
ACTUAL RESULTS
Windows are all black and no text shows. IDLE is unusable in this state.
msg363335 - (view) Author: Jacin Ferreira (Jacin Ferreira) Date: 2020年03月04日 07:53
Uploading another screen shot of preferences.
msg363340 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2020年03月04日 09:19
Thank you for your report. I am unable to reproduce that behavior. I suspect that the most likely explanation is that you are not actually using the python.org 3.8.2 but rather an IDLE and python from some other distributor (like Homebrew) that has a different version of Tk. There is an easy way to check that. From a Terminal.app window, enter the following commands to the Unix shell:
 /usr/local/bin/python3.8 -c "import sys;print(sys.version)"
You should see:
 3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18)
 [Clang 6.0 (clang-600.0.57)]
If not, you are not using Python 3.8.2 from python.org.
Otherwise, then try:
 /usr/local/bin/python3.8 -m idlelib
and see if the Preferences window is still black. If so, another possibility is that your saved IDLE preferences may be interfering. Choose Quit IDLE from the IDLE menu then try moving your existing IDLE preferences out of the way so that IDLE will use the "factory defaults":
 cd
 mv .idlerc old_idlerc
 /usr/local/bin/python3.8 -m idlelib
msg363360 - (view) Author: Jacin Ferreira (Jacin Ferreira) Date: 2020年03月04日 16:42
Thank you so much Ned. I appreciate it. What you said makes sense.
I went ahead and did what you suggested and validated that I am indeed running Python 3.8.2 but I'm still getting the black screens.
bin % /usr/local/bin/python3.8 -c "import sys;print(sys.version)"
3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18) 
[Clang 6.0 (clang-600.0.57)]
bin % /usr/local/bin/python3.8 -m idlelib
 
bin % cd
mv .idlerc old_idlerc
/usr/local/bin/python3.8 -m idlelib
So weird.
msg363361 - (view) Author: Jacin Ferreira (Jacin Ferreira) Date: 2020年03月04日 17:05
which -a python python3
/usr/bin/python
/usr/local/bin/python3
/usr/bin/python3
msg363373 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2020年03月04日 18:30
Hmm, intersting! I have seen problems with black screens before when using some newer versions of Tk which is the main reason we are using Tk 8.6.8 on macOS. Let's try getting some more info:
/usr/local/bin/python3.8 -m test.pythoninfo
Also, which macOS Appearance are you using ( -> System Preferences -> General)? If Dark or Auto, does switching to Light and restarting IDLE make a difference? Any other unusual screen settings or third-party extensions?
msg363386 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020年03月04日 20:36
This is almost certainly a tcl/tk/tkinter on Catalina issue, not an IDLE issue. Screenshots are missing headlight colors, and that should be impossible to cause from Python. In standard python, try
>>> import tkinter as tk
>>> r = tk.Tk()
Should see small (about 2"x2") box. If not, add
>>> r.mainloop()
And/or, try $ python3 -m turtledemo
msg363390 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020年03月04日 21:23
I just upgraded to 10.14.6 and 3.8.2 and python/IDLE is normal. (I have so far closed the every login 'upgrade to Catalina' box because of reports like this.)
Ned, is current 8.6.10 any better than 8.6.9?
msg363398 - (view) Author: Jacin Ferreira (Jacin Ferreira) Date: 2020年03月04日 22:42
I've attached the output of the test.pythoninfo as requested.
I am in Dark mode all the time. I did try Light mode first thing as sometimes apps aren't updated to work in Dark mode but the same exact issue happened.
---
bin % /usr/local/bin/python3
Python 3.8.2 (v3.8.2:7b3ab5921f, Feb 24 2020, 17:52:18) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter as tk
>>> r = tk.Tk()
>>> ^D
msg363399 - (view) Author: Jacin Ferreira (Jacin Ferreira) Date: 2020年03月04日 22:42
tk window showing black
msg363415 - (view) Author: Jacin Ferreira (Jacin Ferreira) Date: 2020年03月05日 03:39
Screenshot showing results of turtle demo
msg363420 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020年03月05日 08:37
The black one from 2.42 shows that the disfunction in your system is not in tkinter app and is likely upstream from that (the relationship between tk and mac).
msg363615 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2020年03月07日 20:31
Thanks for the pythoninfo output. I didn't see anything unusual there. So I remain perplexed. The thing is the macOS Tk 8.6.8 we supply with current python.org installers doesn't support Dark Mode at all, AFAIK. That was added in 8.6.9. I normally have macOS Dark Mode enabled on all of macOS systems, both real and virtual and, with the python.org Tk 8.6.8, Tk windows are always in Light mode, including on 10.15.3, regardless of the settings in System Preferences -> General. I do have at hand a MacPorts Python 3.8.2 that uses a MacPorts-supplied Tk 8.6.10; in that case, the Tk windows do follow the System Preferences Dark Mode preference and IDLE's Preference windows looks fine as one would expect it to in Dark mode. (Unfortunately, there are other problems with IDLE using Tk 8.6.10 that need to be resolved before we can move to it.)
There is this relevant discussion in the Apple Developer documentation:
https://developer.apple.com/documentation/appkit/nsappearancecustomization/choosing_a_specific_appearance_for_your_macos_app?language=objc
Since the python.org macOS Pythons are built with a pre-10.14 SDK, they should be automatically opted out of Dark mode unless you add the NSRequiresAquaSystemAppearance key to the app bundle plist of IDLE.app or Python.app. And that is consistent with the behavior I observe. I verified that, by modifying the python.org IDLE.app plist to include a key NSRequiresAquaSystemAppearance with value NO, IDLE's Tk windows are displayed in Dark mode with the text windows completely dark as in your screen shots. So ... assuming we aren't missing something somewhere and you are not really executing the python.org supplied Python / IDLE when you see this behavior, my only guess at this point is that you have some extension or some system variable set that overrides this automatic opt-out of dark mode for older apps.
There is also some discussion in various forums of a system-wide preference, NSRequiresAquaSystemAppearance, that could be used in macOS Mojave to force dark mode. I tried playing with it on both 10.14 and 10.15 and saw no change in (unmodified) IDLE.app Tk behavior but perhaps I'm missing something.
Maybe all this rings a bell or two for you about customizations you might have made on your system? Otherwise, I don't know what else to suggest at this point. I guess you *could* try tweaking the IDLE.app plist to explicitly disable the dark mode opt-in and see if that makes a difference but, of course, that wouldn't find the root cause. And the other thing would be to try running the python.org in a vanilla 10.15 environment, perhaps in a Fusion VM.
I'm going to close this bug report since it seems unlikely to be a Python or even Tk 8.6.8 issue. But feel free to update or re-open if you find more information. Good luck!
History
Date User Action Args
2022年04月11日 14:59:27adminsetgithub: 84025
2020年03月07日 20:31:57ned.deilysetstatus: open -> closed
resolution: works for me
messages: + msg363615

stage: resolved
2020年03月05日 08:37:43terry.reedysetmessages: + msg363420
2020年03月05日 03:39:26Jacin Ferreirasetfiles: + Screen Shot 2020年03月04日 at 7.39.02 PM.png

messages: + msg363415
2020年03月04日 22:42:56Jacin Ferreirasetfiles: + Screen Shot 2020年03月04日 at 2.42.10 PM.png

messages: + msg363399
2020年03月04日 22:42:40Jacin Ferreirasetfiles: + test.pythoninfo.output.log

messages: + msg363398
2020年03月04日 21:37:40erlendaaslandsetnosy: + erlendaasland
2020年03月04日 21:23:10terry.reedysetmessages: + msg363390
2020年03月04日 20:36:21terry.reedysetassignee: terry.reedy ->
messages: + msg363386
components: + Tkinter, - IDLE
2020年03月04日 18:30:24ned.deilysetmessages: + msg363373
2020年03月04日 17:05:45Jacin Ferreirasetmessages: + msg363361
2020年03月04日 16:42:44Jacin Ferreirasetmessages: + msg363360
2020年03月04日 09:19:41ned.deilysetmessages: + msg363340
2020年03月04日 07:53:45Jacin Ferreirasetfiles: + Screen Shot 2020年03月03日 at 11.51.36 PM.png

messages: + msg363335
2020年03月04日 07:53:22Jacin Ferreiracreate

AltStyle によって変換されたページ (->オリジナル) /