New submission from Terry J. Reedy: Current 3.3.2+ repository build (32 bit) and 3.4.0a2 repository build (32 bit) and installation (64 bit) have a problem that did not exist in my Win6 3.3.2 installation (64 bit). (Bruce Sherwood discovered the symption with some installed version of 3.4.0a?) Adding to recent files a path with a directory or file whose name begins with '0' causes Idle to stop with a traceback such as given below. Currently, opening *any* file causes the recent files list to be rebuilt (seen in traceback). So the problem happens whether one opens a new file with a leading 0 somewhere or if there merely is one such already on the list.
Exception in Tkinter callback Traceback (most recent call last): File "C:\Python34\lib\tkinter\__init__.py", line 1475, in __call__ return self.func(*args) File "C:\Python34\lib\idlelib\IOBinding.py", line 179, in open flist.open(filename, self.loadfile) File "C:\Python34\lib\idlelib\FileList.py", line 34, in open return action(filename) File "C:\Python34\lib\idlelib\IOBinding.py", line 240, in loadfile self.updaterecentfileslist(filename) File "C:\Python34\lib\idlelib\IOBinding.py", line 521, in updaterecentfileslist self.editwin.update_recent_files_list(filename) File "C:\Python34\lib\idlelib\EditorWindow.py", line 915, in update_recent_files_list menu.delete(0, END) # clear, and rebuild: File "C:\Python34\lib\tkinter\__init__.py", line 2739, in delete if 'command' in self.entryconfig(i): File "C:\Python34\lib\tkinter\__init__.py", line 2749, in entryconfigure return self._configure(('entryconfigure', index), cnf, kw) File "C:\Python34\lib\tkinter\__init__.py", line 1247, in _configure self.tk.call(_flatten((self._w, cmd)))): UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 14: invalid start byte 'invalid start byte' 0xc0 has appeared before in other issues. Bruce got this with H:\HP_Documents\0PythonWork\AirplaneKinematics\accel2.py I get 12' instead of '14' with F:\Python\mypy\0...' (file or directory, must be 0, not 1) It appears that the string is being improperly 're-cooked' at some point, so that '\x' sequences are 1 position rather than 2. At the point of failure, I believe tk is checking whether a particular menuitem has an associated callback that should be deleted before the menuitem itself is deleted (before later being rebuilt). (It is a separate issue of whether we could just adjust the recent file list (sub sub menu) rather than deleting and rebuilding it, possibly the same as it was. Even if we did, the issue would still arise when opening a new '0' file, or when closing Idle.) ---------- messages: 197736 nosy: bsherwood, ezio.melotti, haypo, serhiy.storchaka, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Regression: Windows-tkinter-idle, unicode, and 0xxx filename type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19020> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com