[ python-Bugs-843999 ] tkFileDialog.Open is broken
SourceForge.net
noreply at sourceforge.net
Tue Dec 2 12:57:14 EST 2003
Bugs item #843999, was opened at 2003-11-17 13:29
Message generated for change (Comment added) made by reowen
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=843999&group_id=5470
Category: Tkinter
Group: Python 2.3
Status: Closed
Resolution: Works For Me
Priority: 5
Submitted By: Russell Owen (reowen)
Assigned to: Martin v. Löwis (loewis)
Summary: tkFileDialog.Open is broken
Initial Comment:
tkFileDialog.Open is broken, apparently due to the new object interface.
Try the following:
>>> import Tkinter
>>> import tkFileDialog
>>> root = Tkinter.Tk()
>>> tkFileDialog.askopenfilename()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-tk/tkFileDialog.py", line 119, in askopenfilename
return Open(**options).show()
File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-tk/tkCommonDialog.py", line 54, in show
s = self._fixresult(w, s)
File "/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-tk/tkFileDialog.py", line 89, in _fixresult
if not widget.tk.wantobjects() and "multiple" in self.options:
TypeError: wantobjects() takes exactly 1 argument (0 given)
>>>
Looking at the code, tkFileDialog.Open _fixresult is calling widget.tk.wantobjects() and apparently that function always wants an argument (though one would not necessarily think so from the function name, so the bug is not surprising).
----------------------------------------------------------------------
>Comment By: Russell Owen (reowen)
Date: 2003-12-02 09:57
Message:
Logged In: YES
user_id=431773
Sorry I forgot to say the version. I am using Python 2.3.0 (via the binary installer MacPython-OSX-2.3-1.dmg). I'm very glad to hear that this has already been fixed.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-12-01 13:08
Message:
Logged In: YES
user_id=21627
This has been fixed in _tkinter.c 1.161, so you are probably
using some old version.
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2003-11-17 20:42
Message:
Logged In: YES
user_id=33168
What version of Python are you using? I just looked at the
code for 2.3.2 and tested it. 2.3.2 works fine. Perhaps
this bug has already been fixed?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=843999&group_id=5470
More information about the Python-bugs-list
mailing list