You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IDLE: ignore completion ValueError for list.remove() #89360
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:
assignee='https://github.com/terryjreedy'closed_at=Nonecreated_at=<Date2021-09-14.15:33:16.373>labels= ['expert-IDLE', 'type-bug', '3.9']
title='IDLE should suppress ValueError for list.remove()'updated_at=<Date2021-09-15.03:00:13.699>user='https://github.com/rhettinger'
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 1892, in __call__returnself.func(*args)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/idlelib/multicall.py", line 176, in handler
r = l[i](event)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/idlelib/autocomplete_w.py", line 350, in keypress_eventself.hide_window()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/idlelib/autocomplete_w.py", line 463, in hide_windowself.widget.event_delete(HIDE_VIRTUAL_EVENT_NAME, seq)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/idlelib/multicall.py", line 392, in event_delete
triplets.remove(triplet)
ValueError: list.remove(x): x not in list
The triplets collection is part of *virtual* whereas each triplet is derived from a member of sequences.
The discrepancy seems to be extremely rare. I will catch the exception until such time as I see a plausible, reproducible, and testable reason.
Activity
rhettinger commentedon Sep 14, 2021
I got this today running a stock Python 3.9.6 for macOS downloaded from python.org.
-------------------------------------------------------------
terryjreedy commentedon Sep 15, 2021
The offending function is
The triplets collection is part of *virtual* whereas each triplet is derived from a member of sequences.
The discrepancy seems to be extremely rare. I will catch the exception until such time as I see a plausible, reproducible, and testable reason.
[-]IDLE should suppress ValueError for list.remove()[/-][+]IDLE: ignore completion ValueError for list.remove()[/+]gh-89360: Fix ValueError in IDLE MultiCall event_delete (#152738)
[3.13] gh-89360: Fix ValueError in IDLE MultiCall event_delete (GH-15…
[3.14] gh-89360: Fix ValueError in IDLE MultiCall event_delete (GH-15…
[3.15] gh-89360: Fix ValueError in IDLE MultiCall event_delete (GH-15…