Skip to content

Notebook normalizer can't handle notebooks with partially extracted outputs #3440

Closed
@frankharkins

Description

@frankharkins

We currently don't handle the current situation well:

  1. Notebook has multiple image outputs and is normalized (with ./fix)
  2. Writer runs only some cells of the notebook, regenerating only some image outputs
  3. Writer runs ./fix on the same notebook

Since the normalizer detects images that need extracting, it'll delete the existing image folder and extract the new images. This is a problem as the notebook will contain <Image /> tags that reference images that don't exist.

We should generally discourage only running some cells of a notebook, but our normalization script should be able to handle it.

Until we fix this, the workaround is to either:

  1. Re-run the notebook from start to finish (preferably using tox)
  2. If that's not an option, restore the deleted images using Git

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions