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 error: dictionary changed size during iteration
Type: Stage:
Components: IDLE, Windows Versions: Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: kbk Nosy List: christian.heimes, gvanrossum, kbk
Priority: high Keywords:

Created on 2007-12-18 09:03 by christian.heimes, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg58730 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-12-18 09:03
This happens when I press on X to close idle:

c:\dev\python\trunk\PCbuild9>python ../Lib/idlelib/idle.py
Exception in Tkinter callback
Traceback (most recent call last):
  File "c:\dev\python\trunk\lib\lib-tk\Tkinter.py", line 1403, in __call__
    return self.func(*args)
  File "c:\dev\python\trunk\lib\lib-tk\Tkinter.py", line 498, in callit
    func(*args)
  File "c:\dev\python\trunk\lib\idlelib\PyShell.py", line 945, in close2
    return EditorWindow.close(self)
  File "c:\dev\python\trunk\lib\idlelib\EditorWindow.py", line 825, in close
    self._close()
  File "c:\dev\python\trunk\lib\idlelib\PyShell.py", line 961, in _close
    EditorWindow._close(self)
  File "c:\dev\python\trunk\lib\idlelib\EditorWindow.py", line 841, in
_close
    self.per.close()
  File "c:\dev\python\trunk\lib\idlelib\Percolator.py", line 20, in close
    self.redir.close(); self.redir = None
  File "c:\dev\python\trunk\lib\idlelib\WidgetRedirector.py", line 43,
in close
    for operation in self._operations:
RuntimeError: dictionary changed size during iteration

Windows XP, Python 2.6 trunk, Tcl 8.4.16 (corrected build).
msg58766 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-12-18 20:15
You can fix this yourself:

 for operation in list(self._operations.keys()):
msg58777 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-12-18 22:00
Thanks Guido, I didn't read the code before I created this bug report.

Fixed in r59554
History
Date User Action Args
2022-04-11 14:56:29adminsetgithub: 45990
2007-12-18 22:00:24christian.heimessetstatus: open -> closed
resolution: fixed
messages: + msg58777
2007-12-18 20:15:25gvanrossumsetnosy: + gvanrossum
messages: + msg58766
2007-12-18 09:08:36rhettingersetpriority: normal -> high
2007-12-18 09:03:33christian.heimescreate