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

SourceForge.net noreply at sourceforge.net
Mon Nov 17 23:42:28 EST 2003


Bugs item #843999, was opened at 2003-11-17 16:29
Message generated for change (Comment added) made by nnorwitz
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: 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: Neal Norwitz (nnorwitz)
Date: 2003-11-17 23: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