From f3ffe41d541388f4dff28426a70991c48e495b74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maurice=20Hern=C3=A9?= <maurice.herne@rwth-aachen.de> Date: Mon, 28 Oct 2024 14:31:59 +0100 Subject: [PATCH] Fix: attachments = None leads to Jupyter no longer being able to load the notebook --- src/Notebook_Processor/notebook_models/notebook_cell_model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Notebook_Processor/notebook_models/notebook_cell_model.py b/src/Notebook_Processor/notebook_models/notebook_cell_model.py index 8776567..5eefd3b 100644 --- a/src/Notebook_Processor/notebook_models/notebook_cell_model.py +++ b/src/Notebook_Processor/notebook_models/notebook_cell_model.py @@ -85,7 +85,7 @@ class NotebookMarkdownCellModel(BaseNotebookCellModel): "Notebook markdown cell." """ cell_type: Literal["markdown"] - attachments: Optional[dict] = Field(default=None, description="Media attachments (e.g. inline images), stored as mimebundle keyed by filename.") + attachments: dict = Field(default={}, description="Media attachments (e.g. inline images), stored as mimebundle keyed by filename.") class NotebookCodeCellModel(BaseNotebookCellModel): @@ -102,7 +102,7 @@ class NotebookRawCellModel(BaseNotebookCellModel): "Notebook raw nbconvert cell." """ cell_type: Literal["raw"] - attachments: Optional[dict] = Field(default=None, description="Media attachments (e.g. inline images), stored as mimebundle keyed by filename.") + attachments: dict = Field(default={}, description="Media attachments (e.g. inline images), stored as mimebundle keyed by filename.") NotebookCellAnnotation = Annotated[ -- GitLab