◐ Shell
clean mode source ↗

Message 248332 - Python tracker

Unfortunately, we didn't test this change with Tk 8.4: TkFixedFont does not exist in 8.4.  This means that, unless the user has already modified the IDLE configuration to use an explicit font, IDLE linked with Tk 8.4 crashes in initialization.

$ mv .idlerc/ .idlerc-OLD
$ idle3.5
Traceback (most recent call last):
  File "/usr/local/bin/idle3.5", line 5, in <module>
    main()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/idlelib/PyShell.py", line 1560, in main
    shell = flist.open_shell()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/idlelib/PyShell.py", line 320, in open_shell
    self.pyshell = PyShell(self)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/idlelib/PyShell.py", line 867, in __init__
    OutputWindow.__init__(self, flist, None, None)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/idlelib/OutputWindow.py", line 16, in __init__
    EditorWindow.__init__(self, *args)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/idlelib/EditorWindow.py", line 233, in __init__
    text['font'] = idleConf.GetFont(self.root, 'main', 'EditorWindow')
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/idlelib/configHandler.py", line 691, in GetFont
    f = Font(name='TkFixedFont', exists=True, root=root)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tkinter/font.py", line 87, in __init__
    "named font %s does not already exist" % (self.name,))
_tkinter.TclError: named font TkFixedFont does not already exist
n

A workaround is to manually create or edit the IDLE configuration file and define an explicit font, for example on OS X:

$ cat >.idlerc/config-main.cfg <<EOF
[EditorWindow]
font-size = 11
font = monaco
EOF

This is a release blocker for 3.5.0, first seen in 3.5.0rc1.