Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Error displaying widget: model not found

未关闭
#456 12 条评论 4 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
jupyter-notebook, python
领域
devtools, frontend

调研方向

首先重现 notebook 片段并检查 JupyterLab 扩展列表。将 ipympl 0.8.8 与 jupyter-matplotlib v0.10.1 扩展进行比较,尤其关注旧版扩展覆盖它的报告;当 widget 显示且没有 model 或 unregistered-module 错误时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Describe the issue

%matplotlib widget
import matplotlib.pyplot as plt

plt.plot([0,1],[0,1])

results in

Error displaying widget: model not found

The javascript console shows:

Could not instantiate widget
Error: Could not create a model.
Uncaught (in promise) Error: Module jupyter-matplotlib, semver range ^0.10.5 is not registered as a widget module

Versions

 3.9.12 (main, Mar 26 2022, 15:44:31) 
[Clang 13.1.6 (clang-1316.0.21.2)]
ipympl version: 0.8.8
Selected Jupyter core packages...
IPython          : 8.2.0
ipykernel        : 6.12.1
ipywidgets       : 7.7.0
jupyter_client   : 7.2.1
jupyter_core     : 4.9.2
jupyter_server   : 1.16.0
jupyterlab       : 3.3.2
nbclient         : 0.5.13
nbconvert        : 6.4.5
nbformat         : 5.3.0
notebook         : 6.4.10
qtconsole        : not installed
traitlets        : 5.1.1
Known nbextensions:
  config dir: /Users/remco/.jupyter/nbconfig
    notebook section
      toggle_all_line_numbers/main  enabled 
      - Validating: OK
      equation-numbering/main  enabled 
      - Validating: OK
      toc2/main  enabled 
      - Validating: OK
      collapsible_headings/main disabled
      nbextensions_configurator/config_menu/main  enabled 
      - Validating: problems found:
        - require?  X nbextensions_configurator/config_menu/main
      scroll_down/main  enabled 
      - Validating: OK
      jupyter-js-widgets/extension  enabled 
      - Validating: OK
      contrib_nbextensions_help_item/main  enabled 
      - Validating: OK
    tree section
      nbextensions_configurator/tree_tab/main  enabled 
      - Validating: problems found:
        - require?  X nbextensions_configurator/tree_tab/main
  config dir: /usr/local/etc/jupyter/nbconfig
    notebook section
      jupyter-matplotlib/extension  enabled 
      - Validating: OK
      jupyter-js-widgets/extension  enabled 
      - Validating: OK
JupyterLab v3.3.2
/usr/local/share/jupyter/labextensions
        jupyter-matplotlib v0.10.1 enabled OK
        @jupyter-widgets/jupyterlab-manager v3.0.1 enabled OK (python, jupyterlab_widgets)

Other labextensions (built into JupyterLab)
   app dir: /opt/homebrew/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Versions/3.9/share/jupyter/lab


The following source extensions are overshadowed by older prebuilt extensions:
    jupyter-matplotlib
主要语言
Jupyter Notebook
星标
1.7k
派生
234
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

matplotlib/ipympl 的其他 Issue

查看 matplotlib/ipympl 的全部 Issue

相似的 Issue

更多 DevTools Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。