[Idle-dev] Python 3.4.0 alpha 2 available
Terry Reedy
tjreedy at udel.edu
Thu Sep 12 01:30:01 CEST 2013
On 9/10/2013 6:20 PM, Bruce Sherwood wrote:
> Here's what I see. Make any sense?
>
> C:\Python34>python -m idlelib
Do you see Idle at all? If so, what do you see, and did you click
anything to get this?
> Exception in Tkinter callback
Exceptions in callbacks are nuisance ;-)
> 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\MultiCall.py", line 166, in handler
> r = l[i](event)
> File "C:\Python34\lib\idlelib\ScriptBinding.py", line 127, in
> run_module_event
> return self._run_module_event(event)
> File "C:\Python34\lib\idlelib\ScriptBinding.py", line 138, in
> _run_module_event
I believe this implements 'Run (F5)', which suggests that you invoked this.
> filename = self.getfilename()
> File "C:\Python34\lib\idlelib\ScriptBinding.py", line 190, in getfilename
> self.editwin.io.save(None)
filename = self.editwin.io.filename
if not self.editwin.get_saved():
autosave = idleConf.GetOption('main', 'General',
'autosave', type='bool')
if autosave and filename:
self.editwin.io.save(None)
It sees that you set autosave True. I presume None means do not ask for
a name since there already is one.
> File "C:\Python34\lib\idlelib\IOBinding.py", line 335, in save
> self.save_as(event)
> File "C:\Python34\lib\idlelib\IOBinding.py", line 357, in save_as
> 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:
This must be the Recent files sub-sub-menu, a tk widget. (I have not
looked at Menu widgets at all.) The file saved gets added or moved to
the top. It is odd that failure happen during deletion.
> File "C:\Python34\lib\tkinter\__init__.py", line 2739, in delete
> if 'command' in self.entryconfig(i):
Looking for a command associated with the menu entry; will delete if
there is. Indeed, there should be, as each menu entry has a callback to
open the file in an edit window. This is set in update_recent_files_list
as part of rebuilding.
> File "C:\Python34\lib\tkinter\__init__.py", line 2749, in entryconfigure
Another Menu method.
> 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
This does not say what string it found an error in. 'entryconfigure' has
14 chars, so it does not have a position 14.
Does your recent file list (in .idlerc) have any names with non-ascii chars?
>>> b'\xc0'.decode('latin-1')
'À'
Perhaps Vidle encodes to something other than utf-8.
--
Terry Jan Reedy
More information about the IDLE-dev
mailing list