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 revise config-extensions.def comment- only good modules
Type: behavior Stage:
Components: IDLE Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: Vader27, cheryl.sabella, taleinat, terry.reedy
Priority: normal Keywords:

Created on 2020-03-21 09:42 by Vader27, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
config-extensions.def Vader27, 2020-05-03 09:05
Messages (15)
msg364735 - (view) Author: Saaheer Purav (Vader27) Date: 2020-03-21 09:42
In Python 3.8.2 IDLE, when I try to select a new theme or change the font and font size in the Configure IDLE section, and click on 'Ok' or 'Apply', nothing happens. The buttons have no action. Even when I tried to press F5 to run module, nothing happened. In the 'config-keys.def' file, I edited the run module to 'F6' and tried to run module, but still nothing happened. However, when I edited the file back to 'F5' for run module, it worked, strangely. But still I am unable to select a new theme or change the font and font size as the buttons do not work.
msg364775 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-03-21 20:44
I have no problem with 3.8.2 on Windows 10.  Tal and Cheryl, what about your systems?

Saaheer, what OS, and if macOS, what version are you using?  (macOS Catalina has had some problems.)  How did you install or upgrade to 3.8.2?
msg364792 - (view) Author: Saaheer Purav (Vader27) Date: 2020-03-22 09:31
I use Windows 10. I had a similar issue with python 3.8.0, which is why I uninstalled it and installed Python 3.8.2. The issue had been cleared, but then after a few weeks it happened again.
msg364796 - (view) Author: Saaheer Purav (Vader27) Date: 2020-03-22 10:22
I have tried everything like going to the .idlerc folder and making changes, but nothing worked. Finally, I had to change the original config files and it worked because Python is assuming that another theme which I put under 'IDLE Classic' is the original one. Also, the key for run-module(F5) doesn't work. In the original config file, the key for run-module is <Key-F5>. However, Python does not read only that particular line and in the configure IDLE it shows that the field for run-module is empty.
msg364976 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-03-25 03:36
Once you touch the idlelib/*.def files or manually edit the .idlerc/*.cfg files, you are on your own.  You could rename any *.def files and try to 'repair' the installation, or delete the *.cfg files and rebuild then through the dialog.  

You could also start IDLE from Command Prompt with 'py -m idlelib' and report any error messages.
msg365158 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-03-27 16:07
Upgrading to bugfix releases is usually a good idea.  Aside from everything else, there is usually some change to IDLE.

Again, how are you installing python?  From the python.org installer (which one)?  From the Window store?  From a 3rd party installer?
msg365159 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-03-27 16:09
What does Help => About IDLE say about the tk version?
msg367221 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2020-04-24 20:41
Saaheer, could you please run IDLE by opening a command window (Run -> cmd.exe) or PowerShell, then running `python -m idlelib`? Then when this happens, please check the command / PowerShell window to see whether an error message and/or traceback has appeared there, and if so please copy it here. That would greatly help us to diagnose the issue.
msg367267 - (view) Author: Saaheer Purav (Vader27) Date: 2020-04-25 09:25
This is the error message that I get:

Failed to import extension:  AutoExpand
Failed to load extension 'AutoExpand'
Traceback (most recent call last):
  File "C:\Users\saahe\AppData\Local\Programs\Python\Python38-32\lib\idlelib\editor.py", line 1115, in load_extension
    mod = importlib.import_module('.' + fname, package=__package__)
  File "C:\Users\saahe\AppData\Local\Programs\Python\Python38-32\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'idlelib.AutoExpand'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\saahe\AppData\Local\Programs\Python\Python38-32\lib\idlelib\editor.py", line 1099, in load_standard_extensions
    self.load_extension(name)
  File "C:\Users\saahe\AppData\Local\Programs\Python\Python38-32\lib\idlelib\editor.py", line 1117, in load_extension
    mod = importlib.import_module(fname)
  File "C:\Users\saahe\AppData\Local\Programs\Python\Python38-32\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'AutoExpand'

Failed to import extension:  CallTips
Failed to load extension 'CallTips'
Traceback (most recent call last):
  File "C:\Users\saahe\AppData\Local\Programs\Python\Python38-32\lib\idlelib\editor.py", line 1115, in load_extension
    mod = importlib.import_module('.' + fname, package=__package__)
  File "C:\Users\saahe\AppData\Local\Programs\Python\Python38-32\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'idlelib.CallTips'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\saahe\AppData\Local\Programs\Python\Python38-32\lib\idlelib\editor.py", line 1099, in load_standard_extensions
    self.load_extension(name)
  File "C:\Users\saahe\AppData\Local\Programs\Python\Python38-32\lib\idlelib\editor.py", line 1117, in load_extension
    mod = importlib.import_module(fname)
  File "C:\Users\saahe\AppData\Local\Programs\Python\Python38-32\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'CallTips'

Failed to import extension:  ZoomHeight
Failed to load extension 'ZoomHeight'
Traceback (most recent call last):
  File "C:\Users\saahe\AppData\Local\Programs\Python\Python38-32\lib\idlelib\editor.py", line 1115, in load_extension
    mod = importlib.import_module('.' + fname, package=__package__)
  File "C:\Users\saahe\AppData\Local\Programs\Python\Python38-32\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'idlelib.ZoomHeight'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\saahe\AppData\Local\Programs\Python\Python38-32\lib\idlelib\editor.py", line 1099, in load_standard_extensions
    self.load_extension(name)
  File "C:\Users\saahe\AppData\Local\Programs\Python\Python38-32\lib\idlelib\editor.py", line 1117, in load_extension
    mod = importlib.import_module(fname)
  File "C:\Users\saahe\AppData\Local\Programs\Python\Python38-32\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'ZoomHeight'
msg367269 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2020-04-25 09:46
Saaheer, it seems like you have things from older versions of IDLE in your IDLE config file (in your .idlerc directory). Specifically, the built-in extensions have all been converted to be integral parts of IDLE, and must be removed from your configuration file.

I suggest moving/renaming your .idlerc directory so that IDLE can create a new, clean .idlerc. Then make your personal configurations again, preferably using IDLE's configuration dialog.
msg367282 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-04-25 21:06
Saaheer, using the 'File: Browse...' button under the comment box, please upload (if you still have it) the .../.idlerc/config-extensions.cfg that results in this failure.  Most idlelib files were renamed in 3.6.  'AutoExpand' and 'CallTips' are 2 of the old names.  Built-in extensions were converted after that, and I intended that the new code be compatible with existing customizations.  Current IDLE should not fail this way and your file should help with the fix.

You should only need to rename this file to config-extensions.cfg.old or something and leave the other files in .idlerc alone.
msg367921 - (view) Author: Saaheer Purav (Vader27) Date: 2020-05-02 10:00
In my .idlerc folder, only 1 file is there- 'recent-files.lst'.
msg367945 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-05-02 18:04
Module 'autoexpand' has a class 'AutoExpand' imported by editor.py near the top.  After rechecking the editor and config code, I am sure that the only way editor line 1115 could try to import *module* AutoExpand is if either idlelib/config-extensions.def or .idlerc/config-extensions.cfg contains a section header '[AutoExpand]'.  Since the latter does not exist on your machine, it must be the former.  Please attach your copy of config-extensions.def.
msg367959 - (view) Author: Saaheer Purav (Vader27) Date: 2020-05-03 09:05
Here is the file.
msg367965 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-05-03 09:37
Everything from AutoComplete onwards has been added somehow and must be removed.

The preliminary version of 3.8.3 was released last Wednesday.  When the final version is released in a week or two, I recommend upgrading and getting the untouched .def files.

I am leaving this issue open to revise the comments in the file and explain that except for the 4 back compatibility entries, there must only be sections for currently existing and loadable modules.
History
Date User Action Args
2022-04-11 14:59:28adminsetgithub: 84212
2020-06-15 22:46:45terry.reedysettitle: IDLE fails trying to inport old idlelib file names for config -> IDLE revise config-extensions.def comment- only good modules
2020-05-03 09:37:46terry.reedysetmessages: + msg367965
stage: test needed ->
2020-05-03 09:05:02Vader27setfiles: + config-extensions.def

messages: + msg367959
2020-05-02 18:04:31terry.reedysetmessages: + msg367945
2020-05-02 10:00:35Vader27setmessages: + msg367921
2020-04-25 21:06:38terry.reedysettitle: Python Configure IDLE 'Ok' and 'Apply' buttons do not seem to work. -> IDLE fails trying to inport old idlelib file names for config
messages: + msg367282
stage: test needed
2020-04-25 09:46:39taleinatsetmessages: + msg367269
2020-04-25 09:25:48Vader27setmessages: + msg367267
2020-04-24 20:41:03taleinatsetmessages: + msg367221
2020-03-27 16:09:40terry.reedysetmessages: + msg365159
2020-03-27 16:07:39terry.reedysetmessages: + msg365158
2020-03-25 03:36:45terry.reedysetmessages: + msg364976
2020-03-22 10:22:33Vader27setmessages: + msg364796
2020-03-22 09:31:24Vader27setmessages: + msg364792
2020-03-21 20:44:10terry.reedysetnosy: + taleinat, cheryl.sabella
messages: + msg364775
2020-03-21 09:42:34Vader27create