Description of problem: 1. launch a new terminal (such as gnome-terminal) 2. On new terminal, type $ koji <tab><tab> Then this backtrace occurrs (100% reproducible) koji-1.33.1-2.fc39.noarch python3-argcomplete-2.0.0-10.fc39.noarch Version-Release number of selected component: python3-argcomplete-2.0.0-10.fc39 Additional info: reporter: libreport-2.17.11 runlevel: N 5 interpreter: python3-3.12.0~rc1-1.fc39.x86_64 reason: __init__.py:287:__getitem__:KeyError: 'console_scripts' exception_type: StopIteration crash_function: __getitem__ cmdline: /usr/bin/python3 -m argcomplete._check_console_script /bin/koji type: Python3 kernel: 6.4.9-200.fc38.x86_64 cgroup: 0::/user.slice/user-500.slice/user/app.slice/app-org.gnome.Terminal.slice/vte-spawn-df5ed674-d1c2-4411-876d-8022134f2db2.scope uid: 500 executable: /usr/lib/python3.12/site-packages/argcomplete/_check_console_script.py package: python3-argcomplete-2.0.0-10.fc39 Truncated backtrace: #1 [/usr/lib64/python3.12/importlib/metadata/__init__.py:285] __getitem__ Potential duplicate: bug 2231589
Created attachment 1983100 [details] File: environ
Created attachment 1983101 [details] File: mountinfo
Created attachment 1983102 [details] File: open_fds
Created attachment 1983103 [details] File: namespaces
Created attachment 1983104 [details] File: backtrace
Created attachment 1983105 [details] File: os_info
Created attachment 1983106 [details] File: cpuinfo
Looks like below? https://github.com/kislyuk/argcomplete/issues/435 https://github.com/kislyuk/argcomplete/pull/436
*** Bug 2231589 has been marked as a duplicate of this bug. ***
https://src.fedoraproject.org/rpms/python-argcomplete/pull-request/16 https://src.fedoraproject.org/rpms/python-argcomplete/pull-request/17
FEDORA-2023-530e9e4567 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-530e9e4567
FEDORA-2023-237c202647 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-237c202647
FEDORA-2023-237c202647 has been pushed to the Fedora 40 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2023-530e9e4567 has been pushed to the Fedora 39 stable repository. If problem still persists, please make note of it in this bug report.
I wanted to have the path argument autocompleted and pressed tab when this occured. reporter: libreport-2.17.11 kernel: 6.5.0-57.fc39.x86_64 cmdline: /usr/bin/python3 -m argcomplete._check_console_script /home/lruzicka/.local/bin/needly cgroup: 0::/user.slice/user-1000.slice/user/app.slice/vte-spawn-f39e3819-9344-44c0-acc9-d3a1f3b0510a.scope uid: 1000 reason: __init__.py:287:__getitem__:KeyError: 'console_scripts' executable: /usr/lib/python3.12/site-packages/argcomplete/_check_console_script.py type: Python3 package: python3-argcomplete-2.0.0-11.fc39 runlevel: N 5 exception_type: StopIteration crash_function: __getitem__ interpreter: python3-3.12.0~rc1-1.fc39.x86_64 comment: I wanted to have the path argument autocompleted and pressed tab when this occured.
Occurs when I use fedpkg or rfpkg command. reporter: libreport-2.17.11 executable: /usr/lib/python3.12/site-packages/argcomplete/_check_console_script.py uid: 1000 cgroup: 0::/user.slice/user-1000.slice/user/app.slice/app-org.gnome.Terminal.slice/vte-spawn-823f1d72-1d0e-44a9-aad2-dd6fbfe4d452.scope crash_function: __getitem__ cmdline: /usr/bin/python3 -m argcomplete._check_console_script /usr/bin/koji-rpmfusion comment: Occurs when I use fedpkg or rfpkg command. runlevel: N 5 interpreter: python3-3.12.0~rc1-1.fc39.x86_64 kernel: 6.5.0-0.rc5.20230808git14f9643dc90a.37.fc39.x86_64 exception_type: StopIteration type: Python3 package: python3-argcomplete-2.0.0-10.fc39 reason: __init__.py:287:__getitem__:KeyError: 'console_scripts'
using rfpkg and koji-rpmfusion command reporter: libreport-2.17.11 executable: /usr/lib/python3.12/site-packages/argcomplete/_check_console_script.py uid: 1000 cgroup: 0::/user.slice/user-1000.slice/user/app.slice/app-org.gnome.Terminal.slice/vte-spawn-8091ff98-fb09-41b8-a1c6-55cc868e1beb.scope crash_function: __getitem__ cmdline: /usr/bin/python3 -m argcomplete._check_console_script /usr/bin/rfpkg comment: using rfpkg and koji-rpmfusion command runlevel: N 5 interpreter: python3-3.12.0~rc1-1.fc39.x86_64 kernel: 6.5.0-57.fc39.x86_64 exception_type: StopIteration type: Python3 package: python3-argcomplete-2.0.0-11.fc39 reason: __init__.py:287:__getitem__:KeyError: 'console_scripts'
I still get the issue with the fixed version.
Trying to autocomplete "koji downl<tab>" reporter: libreport-2.17.11 kernel: 6.5.3-300.fc39.x86_64 cmdline: /usr/bin/python3 -m argcomplete._check_console_script /usr/bin/koji cgroup: 0::/user.slice/user-1000.slice/user/app.slice/app-org.gnome.Terminal.slice/vte-spawn-ee64f5b7-c328-4fba-8ac2-ed125a1de973.scope uid: 1000 reason: __init__.py:287:__getitem__:KeyError: 'console_scripts' executable: /usr/lib/python3.12/site-packages/argcomplete/_check_console_script.py type: Python3 package: python3-argcomplete-2.0.0-11.fc39 runlevel: N 5 exception_type: StopIteration crash_function: __getitem__ interpreter: python3-3.12.0~rc2-1.fc39.x86_64 comment: Trying to autocomplete "koji downl<tab>"
The patch we packported https://github.com/kislyuk/argcomplete/commit/f4d046c0cec1dab17f65853442b1da7d341e2915 makes an assumption: # The importlib_metadata backport returns a tuple of entry point objects # whereas the official library returns a SelectableGroups object if not use_entry_points_backport: entry_points = entry_points["console_scripts"] # type:ignore However, the Python 3.12 "official library" returns a tuple as well. Observe: $ python3 # on Fedora 38 Python 3.11.5 (main, Aug 28 2023, 00:00:00) [GCC 13.2.1 20230728 (Red Hat 13.2.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from importlib.metadata import entry_points as importlib_entry_points >>> entry_points = importlib_entry_points() >>> entry_points {'babel.checkers': [EntryPoint(name='num_plurals', value='babel.messages.checkers:num_plurals', group='babel.checkers'), ...} >> entry_points["console_scripts"] <stdin>:1: DeprecationWarning: SelectableGroups dict interface is deprecated. Use select. [EntryPoint(name='distro', value='distro.distro:main', group='console_scripts'), ...] $ python3 # on Fedora 39 Python 3.12.0rc1 (main, Aug 7 2023, 00:00:00) [GCC 13.2.1 20230728 (Red Hat 13.2.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from importlib.metadata import entry_points as importlib_entry_points >>> entry_points = importlib_entry_points() >>> entry_points (EntryPoint(name='cffi_modules', value='cffi.setuptools_ext:cffi_modules', group='distutils.setup_keywords'), ...) >>> entry_points["console_scripts"] Traceback (most recent call last): File "/usr/lib64/python3.12/importlib/metadata/__init__.py", line 285, in __getitem__ return next(iter(self.select(name=name))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ StopIteration During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.12/importlib/metadata/__init__.py", line 287, in __getitem__ raise KeyError(name) KeyError: 'console_scripts'
I'd appreciate it if you could test the probable fix: https://src.fedoraproject.org/rpms/python-argcomplete/pull-request/20 (rawhide) https://src.fedoraproject.org/rpms/python-argcomplete/pull-request/21 (f39)
I downloaded Fedora-Workstation-Live-x86_64-39-20230914.n.0.iso and booted it up. Apparently, it contains python3-argcomplete, so let's request a freeze exception. liveuser@localhost-live:~$ rpm -q python3-argcomplete python3-argcomplete-2.0.0-11.fc39.noarch I'll try to figure out what uses argcomplete there and try to reproduce the problem and test the fix.
liveuser@localhost-live:~$ dnf repoquery --installed --whatrequires python3-argcomplete abrt-tui-0:2.17.1-3.fc39.noarch liveuser@localhost-live:~$ rpm -ql abrt-tui | grep /bin /usr/bin/abrt /usr/bin/abrt-cli abrt(-cli) is not a console script entyrpoint. I cannot reproduce a crash with it. Installing /usr/bin/koji and trying `koji downl<tab>` -- I still cannot reproduce the crash :(
I cannot reproduce this failure either. I tested with multiple packages that provide argcomplete completions scripts. $ rpm -q koji python3-argcomplete bash-completion fedpkg ansible-core koji-1.33.1-2.fc39.noarch python3-argcomplete-2.0.0-11.fc40.noarch bash-completion-2.11-12.fc39.noarch fedpkg-1.44-6.fc39.noarch ansible-core-2.15.4-1.fc40.noarch $ koji download<tab> download-build download-logs download-task $ fedpkg cl<tab> clean clog clone $ ansible-playbook --f<tab> --flush-cache --force-handlers --forks
FEDORA-2023-36405da4ad has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-36405da4ad
FEDORA-2023-36405da4ad has been pushed to the Fedora 40 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2023-c08ad96e9c has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-c08ad96e9c
FEDORA-2023-c08ad96e9c has been pushed to the Fedora 39 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-c08ad96e9c` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-c08ad96e9c See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
This is a fresh install of Fedora39 KDE spin and looking at the time of the error, it has happened right after the install or on the initial updates. reporter: libreport-2.17.11 kernel: 6.5.2-301.fc39.x86_64 cmdline: /usr/bin/python3 -m argcomplete._check_console_script /usr/bin/dnf cgroup: 0::/user.slice/user-1000.slice/session-4.scope uid: 0 reason: __init__.py:287:__getitem__:KeyError: 'console_scripts' executable: /usr/lib/python3.12/site-packages/argcomplete/_check_console_script.py type: Python3 package: python3-argcomplete-2.0.0-11.fc39 runlevel: N 5 exception_type: StopIteration crash_function: __getitem__ interpreter: python3-3.12.0~rc1-1.fc39.x86_64 comment: This is a fresh install of Fedora39 KDE spin and looking at the time of the error, it has happened right after the install or on the initial updates.
Did not notice the fix, so my report is not usefull anymore. I apologize for the extra report and will try the fix later, it was not available yet for me
in a gnome-terminal, write `meld` and hit `tab` key for triggering autocompletion reporter: libreport-2.17.11 kernel: 6.5.3-300.fc39.x86_64 cmdline: /usr/bin/python3 -m argcomplete._check_console_script /usr/bin/meld cgroup: 0::/user.slice/user-20528.slice/user/app.slice/app-org.gnome.Terminal.slice/vte-spawn-e4b10005-c035-4d37-95d0-8ddfc061f284.scope uid: 0 reason: __init__.py:287:__getitem__:KeyError: 'console_scripts' executable: /usr/lib/python3.12/site-packages/argcomplete/_check_console_script.py type: Python3 package: python3-argcomplete-2.0.0-11.fc39 runlevel: N 5 exception_type: StopIteration crash_function: __getitem__ interpreter: python3-3.12.0~rc2-1.fc39.x86_64 comment: in a gnome-terminal, write `meld` and hit `tab` key for triggering autocompletion
Verified fixed with python-argcomplete-2.0.0-12.fc39 following reproduction steps both in #c0 and #c31
FEDORA-2023-c08ad96e9c has been pushed to the Fedora 39 stable repository. If problem still persists, please make note of it in this bug report.