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.

Title: IDLE: Handle bad highlight tab color config
Type: behavior Stage: test needed
Components: IDLE Versions: Python 3.10
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: terry.reedy
Priority: normal Keywords:

Created on 2020-07-29 03:33 by terry.reedy, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg374558 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-07-29 03:33 froze IDLE with a custom theme missing 'colours for the blinker and highlighting'.  I reported some experiments there.  Tracebacks might help, but

Proposal 1: check theme before try to paint.  All keys present?  Replace missing with normal colors. froze IDLE with a custom theme with a bad color "#00224".

 File "C:\Users\...\idlelib\", line 1279, in paint_theme_sample
    self.highlight_sample.tag_config(element, **colors)
_tkinter.TclError: invalid color name "#00224"

Proposal 2: wrap line in try-except, if error text matches, extract bad color, replace any occurrence of bad color with "#000000" (black) or "#FFFFFF" (white), report to user with suggestion to edit.  Maybe save first.  Should do within loop in case more errors.
Date User Action Args
2022-04-11 14:59:34adminsetgithub: 85604
2020-07-29 03:33:23terry.reedycreate