[ python-Bugs-843999 ] tkFileDialog.Open is broken

SourceForge.net noreply at sourceforge.net
Mon Nov 17 16:29:34 EST 2003


Bugs item #843999, was opened at 2003-11-17 13:29
Message generated for change (Tracker Item Submitted) made by Item Submitter
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: Open
Resolution: None
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).

----------------------------------------------------------------------

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