Checks wether matplotlib's backend is interactive even though matplotlib is not required and not installed
@heejaechang đang làm issue này rồi.
Từ ngày 15/12/2024.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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: pathDuring 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:
- Initialize a new project with uv and add
colour-sciencepackage
uv init
uv add colour-science
- Add
import colourin defaulthello.py
import colour
def main():
print("Hello from reproduce-debugpy-error!")
if __name__ == "__main__":
main()
- Add a breakpoint anywhere and run
Python Debugger: Debug Python File
- Ngôn ngữ chính
- Python
- Star
- 2.5k
- Fork
- 205
- Merge trung bình
- 1 ngày 43 phút
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/debugpy
-
pydevd_comm.py start_client() does not set TCP_NODELAY on the connections it opensCó thể đã có người làm @nightcityblade đã nhận 55 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Document "rules"-optionCó thể đã có người làm @nightcityblade đã nhận 43 ngày trước. Đang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
wx.EventLoop() deprecation warningCó thể đã có người làm @nightcityblade đã nhận 42 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
debugpy.configure(python=) is not properly documentedCó thể đã có người làm @nightcityblade đã nhận 53 ngày trước. Đang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
Tất cả issue của microsoft/debugpy
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
aicell-lab/bioengine#232 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
modelscope/evalscope#1836 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
jbaruch/speaker-toolkit#480 ·
Maintainer thường phản hồi trong vòng 1 ngày