Checks wether matplotlib's backend is interactive even though matplotlib is not required and not installed
@heejaechang 已经在做这个了。
开始于 2024年12月15日。
评估
这个 Issue 还没有评估数据。
描述
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
- 主要语言
- Python
- 星标
- 2.5k
- 派生
- 205
- 平均合并
- 1 天 43 分钟
- 30 天内合并 PR
- 6
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/debugpy 的其他 Issue
-
pydevd_comm.py start_client() does not set TCP_NODELAY on the connections it opens可能已有人在做 @nightcityblade 于 55 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
-
Document "rules"-option可能已有人在做 @nightcityblade 于 43 天前认领。 未关闭documentation
难度 2/5 1-3 小时 新手友好度 68/100
-
wx.EventLoop() deprecation warning可能已有人在做 @nightcityblade 于 42 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
-
debugpy.configure(python=) is not properly documented可能已有人在做 @nightcityblade 于 53 天前认领。 未关闭documentation
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 5/5 一周以上 新手友好度 15/100
查看 microsoft/debugpy 的全部 Issue
相似的 Issue
-
dependencies feature github_actions good first issue
难度 2/5 1-3 小时 新手友好度 62/100
wemake-services/wemake-django-template#3149 ·
维护者通常 1 天内回复
-
upstream update
难度 2/5 1-3 小时 新手友好度 65/100
conan-io/conan-center-index#31142 ·
维护者通常 1 天内回复
-
area:core bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
request-theme
难度 2/5 1 小时以内 新手友好度 70/100
LizardByte/ThemerrDB#8877 · 1 条评论 ·
维护者通常 1 天内回复
-
area/install-update comp/gateway P0 sweeper:risk-compatibility type/bug
难度 2/5 1 小时以内 新手友好度 72/100
NousResearch/hermes-agent#135997 · 3 条评论 ·
维护者通常 1 天内回复