You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tkinter File Dialog crashes on Win7 when saving to Documents Library #57197
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2013-03-08.20:47:55.657>created_at=<Date2011-09-15.21:45:05.434>labels= ['expert-tkinter', 'OS-windows', 'type-crash']
title='Tkinter File Dialog crashes on Win7 when saving to Documents Library'updated_at=<Date2013-03-08.20:47:55.656>user='https://bugs.python.org/BrianGernhardt'
The view of MyDocuments in the save dialog is different from that of Windows Explorer. In particular, it shows a directory twice, the current version and an older version. Double clicking the current version, to see the contents, also crashed IDLE without saving. Win Explorer moves into that directory just fine.
Tried it again, and double click into dirs now works. Saving still crashes. But I still see two versions of the directory when accessing from IDLE (until I redeleted the older one). Saving still crashes.
On Win7, I can replicate the problem with 64-bit Python 3.2.3. However, it does not occur for 32-bit Python 3.2.2.
This problem is not due to IDLE. There is a problem with the 64-bit version of tkinter's file dialog. From a 64-bit python environment, bring up the dialog with:
changed the title [-]IDLE on Win7 crashes when saving to Documents Library[/-][+]Tkinter File Dialog crashes on Win7 when saving to Documents Library[/+]on May 19, 2012
I re-verified this on win7-64 with 3.3.0a3
From Idle, Idle remains after clicking away the error box.
From Command Prompt, CP disappears after clicking away box.
Problem is not specific to Donwloads. Other Libraries fail also.
Desktop and other normal places succeed.
I closed bpo-14996 as a duplicate of this. The OP there claimed that behavior changed between 3.2.1 and 3.2.3 and that she had same problem with 32 bit installation. It is hard to know the exact circumstances of the problem until we find its cause.
Looking further, I am sure this is a tk and/or Win7 problem.
tkinter.filedialog.asksaveasfile() calls SaveAs(**options).show()
SaveAs sets command = "tk_getSaveFile" and inherits _Dialog which inherits commondialog.Dialog. The show method of that calls
tk.call(self.command, *w._options(self.options)). Since the test call has no options, self.options is an empty dict and I presume the serialized form w._options() is also. So the call amounts to
tk.call("tk_getSaveFile"), which suspends python until the dialog returns.
That said, 3.3.0a4 was released a week ago with tcl/tk upgraded, in the Windows installer, from 8.5.9 to 8.5.11. So I retried the previous test and the problem is gone. Can someone else verify? If so, we can close this as fixed. (I believe that the same upgrade will appear in future 3.2 and 2.7 releases, but I am not sure.)
serwy commented on Jun 7, 2012
serwymannequin
Mannequin
More actions
I installed 3.3.0a4 (64-bit) on Win 7 and the issue did not occur when using asksaveasfile. I repeated with 32-bit 3.3.0a4 without any problems.
How can we confirm that 3.2 will receive the Tcl/Tk upgrade? (64-bit 2.7.3 does not have this bug.)
As near as I can tell, the tcl/tk distributed with Windows is not upgraded in bugfix releases. I presume it is a matter of testing and stability and not introducing any new features in the new tcl/tk. In any case, on Windows, this is fixed in 3.3 (and hopefully in 3.4) but will apparently not be fixed in earlier microreleases. That sometimes happens.
Activity
BrianGernhardt commentedon Sep 15, 2011
Python 3.2.1 (default, Jul 10 2011, 20:02:51) [MSC v.1500 64 bit (AMD64)] on win32
Steps:
I tried running it from the command line (via c:\python32\python -m idlelib.idle) and it produced no useful error messages.
terryjreedy commentedon Sep 16, 2011
I got same with 3.2.2. I did it first from editor window and it only crashed that window, leaving the shell window ok until I tried it there also.
terryjreedy commentedon Sep 16, 2011
The view of MyDocuments in the save dialog is different from that of Windows Explorer. In particular, it shows a directory twice, the current version and an older version. Double clicking the current version, to see the contents, also crashed IDLE without saving. Win Explorer moves into that directory just fine.
Tried it again, and double click into dirs now works. Saving still crashes. But I still see two versions of the directory when accessing from IDLE (until I redeleted the older one). Saving still crashes.
CodyC commentedon Nov 11, 2011
Still an issue as of 11/11/11.
serwy commentedon May 19, 2012
On Win7, I can replicate the problem with 64-bit Python 3.2.3. However, it does not occur for 32-bit Python 3.2.2.
This problem is not due to IDLE. There is a problem with the 64-bit version of tkinter's file dialog. From a 64-bit python environment, bring up the dialog with:
and repeat the steps 3-6 from msg144106. It crashes. Repeating this with a 32-bit python environment does not have a problem.
[-]IDLE on Win7 crashes when saving to Documents Library[/-][+]Tkinter File Dialog crashes on Win7 when saving to Documents Library[/+]terryjreedy commentedon May 19, 2012
I re-verified this on win7-64 with 3.3.0a3
From Idle, Idle remains after clicking away the error box.
From Command Prompt, CP disappears after clicking away box.
Problem is not specific to Donwloads. Other Libraries fail also.
Desktop and other normal places succeed.
I cannot but wonder if this is a tk bug.
terryjreedy commentedon Jun 7, 2012
I closed bpo-14996 as a duplicate of this. The OP there claimed that behavior changed between 3.2.1 and 3.2.3 and that she had same problem with 32 bit installation. It is hard to know the exact circumstances of the problem until we find its cause.
Looking further, I am sure this is a tk and/or Win7 problem.
tkinter.filedialog.asksaveasfile() calls SaveAs(**options).show()
SaveAs sets command = "tk_getSaveFile" and inherits _Dialog which inherits commondialog.Dialog. The show method of that calls
tk.call(self.command, *w._options(self.options)). Since the test call has no options, self.options is an empty dict and I presume the serialized form w._options() is also. So the call amounts to
tk.call("tk_getSaveFile"), which suspends python until the dialog returns.
That said, 3.3.0a4 was released a week ago with tcl/tk upgraded, in the Windows installer, from 8.5.9 to 8.5.11. So I retried the previous test and the problem is gone. Can someone else verify? If so, we can close this as fixed. (I believe that the same upgrade will appear in future 3.2 and 2.7 releases, but I am not sure.)
serwy commentedon Jun 7, 2012
I installed 3.3.0a4 (64-bit) on Win 7 and the issue did not occur when using asksaveasfile. I repeated with 32-bit 3.3.0a4 without any problems.
How can we confirm that 3.2 will receive the Tcl/Tk upgrade? (64-bit 2.7.3 does not have this bug.)
serwy commentedon Jun 7, 2012
Re-opened.
alirahmjoo commentedon Jul 8, 2012
I have exactly the same problem mentioned by Brian Gernhardt for 32-bit Python 3.2.3 on Win7.
terryjreedy commentedon Mar 8, 2013
As near as I can tell, the tcl/tk distributed with Windows is not upgraded in bugfix releases. I presume it is a matter of testing and stability and not introducing any new features in the new tcl/tk. In any case, on Windows, this is fixed in 3.3 (and hopefully in 3.4) but will apparently not be fixed in earlier microreleases. That sometimes happens.