Serhiy Storchaka added the comment:
Issue18686 is reproducible to me. Here is a script based on issue18686 example.
Run it and open the "File" menu.
$ python3 issue18686.py
.#3069298188.#3069298188#3069298252
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib/python3.5/tkinter/__init__.py", line 1553, in __call__
return self.func(*args)
File "issue18686.py", line 24, in entry_focus_lost
widget_with_focus = self.focus_get()
File "/usr/lib/python3.5/tkinter/__init__.py", line 550, in focus_get
return self._nametowidget(name)
File "/usr/lib/python3.5/tkinter/__init__.py", line 1204, in nametowidget
w = w.children[n]
KeyError: '#3069298188'
But my patch doesn't help in case of tearoff menu. Detach the "File" menu and
hover a mouse on its item.
$ ./python issue18686.py
.#`menu.#`menu#`menu
.`menu.`menu
.tearoff1
Exception in Tkinter callback
Traceback (most recent call last):
File "/home/serhiy/py/cpython/Lib/tkinter/__init__.py", line 1712, in __call__
return self.func(*args)
File "issue18686.py", line 24, in entry_focus_lost
widget_with_focus = self.focus_get()
File "/home/serhiy/py/cpython/Lib/tkinter/__init__.py", line 692, in focus_get
return self._nametowidget(name)
File "/home/serhiy/py/cpython/Lib/tkinter/__init__.py", line 1344, in
nametowidget
w = w.children[n]
KeyError: 'tearoff1'
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue734176>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com