Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Checks wether matplotlib's backend is interactive even though matplotlib is not required and not installed

オープン
#1,782 コメント 0 件 リアクション 1 件 担当者 1 名 GitHub で見る

@heejaechang がすでに取り組んでいます。

2024年12月15日 から。

評価

この issue はまだ評価されていません。

説明

bug needs repro

Environment data

  • "Python Debugger" extension: v2024.14.0 (debugpy-1.8.9)
  • OS and version: macOS Sequoia 15.1.1
  • Python version: 3.12.7
  • VS Code: 1.95.3
  • colour-science: 0.4.6

Actual behavior

In VS Code, I work on a Python script importing colour-science without matplotlib installed:

  • The script runs without raising errors
  • Setting a breakpoint and attempting to debug causes the VS Code Python debugger to crash/stop

Error raised:

Exception has occurred: ModuleNotFoundError
No module named 'matplotlib.rcsetup'; 'matplotlib' is not a package
AttributeError: path

During handling of the above exception, another exception occurred:

File "/My/Path/.vscode/extensions/ms-python.debugpy-2024.14.0-darwin-arm64/bundled/libs/debugpy/_vendored/pydevd/pydev_ipython/matplotlibtools.py", line 59, in is_interactive_backend
from matplotlib.rcsetup import interactive_bk, non_interactive_bk # @UnresolvedImport
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/My/Path/.vscode/extensions/ms-python.debugpy-2024.14.0-darwin-arm64/bundled/libs/debugpy/_vendored/pydevd/pydev_ipython/matplotlibtools.py", line 99, in activate_matplotlib
is_interactive = is_interactive_backend(backend)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/My/Path/Documents/python_projects/reproduce_debugpy_error/hello.py", line 9, in
main()
^^^^
ModuleNotFoundError: No module named 'matplotlib.rcsetup'; 'matplotlib' is not a package

Expected behavior

The debugger should stop at breakpoint and allow stepping through the code

Steps to reproduce:

  1. Initialize a new project with uv and add colour-science package
uv init
uv add colour-science
  1. Add import colour in default hello.py
import colour


def main():
    print("Hello from reproduce-debugpy-error!")


if __name__ == "__main__":
    main()
  1. Add a breakpoint anywhere and run Python Debugger: Debug Python File
主要言語
Python
スター
2.5k
フォーク
205
平均マージ
1日 9時間
マージ済み PR(30日)
3

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/debugpy のほかの issue

microsoft/debugpy の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。