IPython Qt incorrect string formatting in raised error
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 58/100
Research direction
Start with src/debugpy/_vendored/pydevd/pydev_ipython/qt.py lines 15-17 and inspect the RuntimeError format string alongside its arguments. Reproduce the reported Qt API error if possible, then verify that the invalid-API path raises the intended RuntimeError rather than a TypeError.
Written by the indexing model from the issue text.
Description
Issue
I'm getting a Failed to enable GUI event loop integration for 'qt' error when attempting to debug a PyQt application (I've seen the guiEventLoop parameter discussed elsewhere, but I can't find anything about what it actually does. Can anyone explain it?). However, the full traceback for the error seems to point to an additional bug in debugpy concerning these lines:
Abridged traceback:
File "c:\Users\Andrew\.vscode\extensions\ms-python.debugpy-2024.6.0-win32-x64\bundled\libs\debugpy\_vendored\pydevd\pydev_ipython\qt.py", line 16, in <module>
raise RuntimeError("Invalid Qt API %r, valid values are: %r, %r" %
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: not all arguments converted during string formatting
Problematic lines:
https://github.com/microsoft/debugpy/blob/09b5af0bb730e2707ec3bbc14c509523eca116c0/src/debugpy/_vendored/pydevd/pydev_ipython/qt.py#L15-L17
Full traceback
Failed to enable GUI event loop integration for 'qt'
Traceback (most recent call last):
File "c:\Users\Andrew\.vscode\extensions\ms-python.debugpy-2024.6.0-win32-x64\bundled\libs\debugpy\_vendored\pydevd\pydev_ipython\matplotlibtools.py", line 30, in do_enable_gui
enable_gui(guiname)
File "c:\Users\Andrew\.vscode\extensions\ms-python.debugpy-2024.6.0-win32-x64\bundled\libs\debugpy\_vendored\pydevd\pydev_ipython\inputhook.py", line 540, in enable_gui
return gui_hook(app)
^^^^^^^^^^^^^
File "c:\Users\Andrew\.vscode\extensions\ms-python.debugpy-2024.6.0-win32-x64\bundled\libs\debugpy\_vendored\pydevd\pydev_ipython\inputhook.py", line 176, in enable_qt
from pydev_ipython.qt_for_kernel import QT_API, QT_API_PYQT5
File "c:\Users\Andrew\.vscode\extensions\ms-python.debugpy-2024.6.0-win32-x64\bundled\libs\debugpy\_vendored\pydevd\pydev_ipython\qt_for_kernel.py", line 119, in <module>
from pydev_ipython.qt import QtCore, QtGui, QtSvg, QT_API
File "c:\Users\Andrew\.vscode\extensions\ms-python.debugpy-2024.6.0-win32-x64\bundled\libs\debugpy\_vendored\pydevd\pydev_ipython\qt.py", line 16, in <module>
raise RuntimeError("Invalid Qt API %r, valid values are: %r, %r" %
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: not all arguments converted during string formatting
Backend QtAgg is interactive backend. Turning interactive mode on.
Software Versions
- Python: 3.12.2
- VS Code Python extension: v2024.7.11311010 (pre-release)
- VS Code Python Debugger extension: v2024.6.0
- PyQt6: 6.6.1
- Dominant language
- Python
- Stars
- 2.5k
- Forks
- 202
- Avg merge
- 5d 1h
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/debugpy
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
All issues in microsoft/debugpy
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
huggingface/Repo2RLEnv#163 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
NousResearch/hermes-agent#121143 ·