New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tkFileDialog.askopenfiles crashes on Windows 7 #52258
Comments
When using the function "tkFileDialog.askopenfiles()" on Windows 7 (32-bit) the following error occurs after choosing one or more arbitrary files: Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkFileDialog
>>> tkFileDialog.askopenfiles()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python26\lib\lib-tk\tkFileDialog.py", line 163, in askopenfiles
ofiles.append(open(filename, mode))
IOError: [Errno 2] No such file or directory: u'C' So it seems that the colon after "C" (the drive letter) is wrongly used as a delimiter. The functions "askopenfile" (for a single file to choose) and "askopenfilenames" (to choose only the filenames instead of open the files immediately) don't seem to be affected, furthermore the error doesn't occur on Linux or WinXP. |
I reproduce on winXP, and the explanation is simpler: askopenfilenames() returns a string, like "C:/t C:/t2", which is split into single chars... It works if I set Tkinter.wantobjects to False, but I don't know what this means. |
I'll have to try 7 later, but I'm not seeing this on XP. Changing type from crash to behavior, as this appears to just be an IOError. |
Looks as a duplicate of bpo-5712. |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: