笔记本自动保存因文件大小限制而失败Notebook autosave fails due to file size limits

问题Problem

笔记本自动保存失败后会显示以下错误消息:Notebook autosaving fails with the following error message:

Failed to save revision: Notebook size exceeds limit. This is most commonly caused by cells with large results. Remove some cells or split the notebook.

原因Cause

允许自动保存的最大笔记本大小为 8 MB。The maximum notebook size allowed for autosaving is 8 MB.

解决方案Solution

首先,使用浏览器的开发人员工具检查笔记本文件的大小。First, check the size of your notebook file using your browser’s developer tools.

例如,在 Chrome 中,单击“查看”>“开发人员”>“开发人员工具”。In Chrome, for example, click View > Developer > Developer Tools. 单击“网络”选项卡并查看笔记本文件的“大小”列 。Click the Network tab and view the Size column for the notebook file.

笔记本大小Notebook size

下面是两种可能的解决方案:Then, there are two possible solutions:

  1. 可以手动保存最多 32 MB 的笔记本。You can manually save notebooks up to 32 MB.

  2. 可以通过隐藏较大的结果来减小笔记本大小。You can reduce the size of your notebook by hiding large results.

    绘图工具(例如 plotly 和 matplotlib)可以生成以大图像显示的大型结果集。Graphing tools like plotly and matplotlib can generate large sets of results that display as large images. 可以通过隐藏这些大型结果和图像来减小笔记本大小。You can reduce the notebook size by hiding these large results and images.