Skip to content

fix(tutorial): 修复第6.2节天气查询教程Jupyter版图片链接中的%20编码#143

Open
Kailigithub wants to merge 1 commit into
datawhalechina:mainfrom
Kailigithub:fix/tutorial-mcp-ipynb-broken-image-links
Open

fix(tutorial): 修复第6.2节天气查询教程Jupyter版图片链接中的%20编码#143
Kailigithub wants to merge 1 commit into
datawhalechina:mainfrom
Kailigithub:fix/tutorial-mcp-ipynb-broken-image-links

Conversation

@Kailigithub

Copy link
Copy Markdown
Collaborator

修改内容

tutorial/FastAPI/第6章-FastAPI MCP/第6.2节-实现天气查询 MCP.ipynb 文件中的图片链接使用了 %20 URL 编码指向目录和文件名,但实际目录 tutorial/FastAPI/第6章-FastAPI MCP/images/ 下的文件名是含中文和空格的纯文本,导致 Jupyter Notebook 渲染时全部 14 张配图无法显示。

具体问题:

  • 目录路径 ../第6章-FastAPI%20MCP/images/ 中的 %20 应为字面空格(11 处)
  • 文件名 06-安装配置Cherry%20Studio.png / 07-FastAPI%20docs测试.png / 08-MCP%20Tool.png 中的 %20 应为字面空格(3 处)

合计 14 处替换,将所有 %20 还原为字面空格字符。

#130 的关系

PR #130 已修复 tutorial/FastAPI/md版本/第22课-实现天气查询 MCP.md 文件中的相同问题。本 PR 处理同章节 Jupyter Notebook 版本的同一问题,两个文件是教程的不同载体(Markdown 与 Jupyter),分别独立渲染。合并后教程两个版本均能正确显示配图。

验证

/tmp/test_tutorial_ipynb_fix.py 覆盖五项检查:

  1. JSON 解析有效,13 个 cell 结构保留
  2. 文件中 %20 总数从 14 降至 0
  3. 全部 14 个图片链接在 tutorial/FastAPI/第6章-FastAPI MCP/images/ 目录中正确解析
  4. cell 数量、output 数量与修改前一致(无数据丢失)
  5. 14 个目标图片文件均存在

并通过 git-stash 三步验证:未修复时 Image links: 0 resolve, 14 missing,修复后 Image links: 14 resolve, 0 missing

影响范围

仅修改 1 个 Jupyter Notebook 文件,14 行替换;不影响任何代码、配置或运行时行为;不破坏现有 Jupyter 渲染(其他教程目录中的图片均使用字面空格)。

测试建议

  • 在 Jupyter Notebook / nbviewer 中打开该文件,确认 14 张配图全部正确显示
  • 对照 tutorial/FastAPI/第6章-FastAPI MCP/images/ 目录中实际文件名,确认链接一一对应

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant