[issue35379] IDLE's close fails when io.filename set to None

Terry J. Reedy report at bugs.python.org
Sat Sep 14 00:55:07 EDT 2019


Terry J. Reedy <tjreedy at udel.edu> added the comment:

The get_saved tracebacks reported in #35263 and #38128 are the same except for line numbers. The more recent, from 3 days ago on Mac.
Exception in Tkinter callback
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/tkinter/__init__.py", line 1883, in __call__
    return self.func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/multicall.py", line 176, in handler
    r = l[i](event)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/filelist.py", line 54, in close_all_callback
    reply = edit.close()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/pyshell.py", line 1008, in close
    return EditorWindow.close(self)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/editor.py", line 1077, in close
    reply = self.maybesave()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/outwin.py", line 94, in maybesave
    return 'yes' if self.get_saved() else 'no'
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/editor.py", line 1010, in get_saved
    return self.undo.get_saved()
AttributeError: 'NoneType' object has no attribute 'get_saved'

None.filename from a day ago is also the same except for line numbers.  pyshell line 1008 is in PyShell(OutputWindow(EditorWindow)) so get_saved must result from closing Shell.  pyshell line 309 is in PyShellEditorWindow(EditorWindow) so must come from closing an editor window.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35379>
_______________________________________


More information about the Python-bugs-list mailing list