inequality: the plotly figure (fig:plotly-gini-gdppc-years) renders nothing on the website

未关闭 适合新手
#871 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
80/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
jupyter-notebook, plotly, python

调研方向

打开 lectures/inequality.md 的第 767–776 行和 lectures/_config.yml 的第 79 行;payload 指明了两个 renderer 选项以及被抑制的 mystnb.unknown_mime_type 警告。选择一种 renderer 修复,重新构建 inequality 讲座,并确认该图出现在构建后的页面中。完成意味着 plotly 输出在渲染时不会再静默丢弃 mime-type;还要检查移除抑制是否会影响其他页面。

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

描述

bug

The plotly figure in inequality.md (fig:plotly-gini-gdppc-years, lectures/inequality.md:767–:776) renders nothing on the website. On https://intro.quantecon.org/inequality.html the cell's output is empty (checked 2026-11-15).

Why. plotly 6's default renderer in a Jupyter kernel emits only application/vnd.plotly.v1+json. myst-nb has no renderer for that mimetype, so it drops the output with a mystnb.unknown_mime_type warning. lectures/_config.yml:79 suppresses that warning, and the build passes without a word.

The rm -r _build/.doctrees step in publish.yml plays no part in this: the figure is missing with or without it (QuantEcon/actions#98, where this was found).

Options

  • fig.show(renderer="notebook_connected"), which emits text/html. The #98 repro's test page renders a figure this way, in every build.
  • Setting plotly.io.renderers.default once in the lecture, before the figure.
  • Either way, dropping mystnb.unknown_mime_type from suppress_warnings would turn the next such drop into a warning rather than a silent gap. Other pages may rely on that suppression, though.

Claude Code (on behalf of mmcky)

主要语言
Jupyter Notebook
星标
67
派生
35
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

QuantEcon/lecture-python-intro 的其他 Issue

查看 QuantEcon/lecture-python-intro 的全部 Issue

相似的 Issue

更多 Build System Issue

把新 issue 发到你的邮箱

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