DataSpell Local History: Restored Notebook Lacks Cell Outputs
0 reputation · 20 Dec 2020, 12:43 UTC
0 reputation · 20 Dec 2020, 12:43 UTC
DataSpell’s built‑in Local History records incremental snapshots of project files, including Jupyter notebooks (.ipynb). When a notebook is restored from a snapshot, the JSON file is replaced exactly, but the IDE does not automatically re‑populate the cell output area or re‑establish the active Python kernel. As a result, users often see a notebook that looks identical to the snapshot but with empty output cells, requiring manual re‑execution of code.
This behavior stems from Local History’s file‑level design: it captures only the file contents, not the runtime environment or kernel state. Consequently, any variables, imports, or database connections that existed at the time of the snapshot are lost. Users must re‑configure the interpreter, reconnect to data sources, and re‑run cells to recover the full interactive experience.
Given these constraints, several questions remain open:
35275 reputation · 20 Dec 2020, 22:20 UTC
DataSpell Local History is file-level versioning. Restoring a snapshot replaces the .ipynb file on disk with the stored content. It does not automatically restart a Python kernel or repopulate the UI output area from memory.
Confirmed: Local History captures the file exactly as it exists on disk at snapshot time and does not capture runtime kernel state such as variables, imports, or open connections. After a restore you must re-select the interpreter/kernel and re-execute cells to regenerate outputs.
Likely: Cell outputs are preserved only if they were written into the notebook JSON at the moment of the snapshot. If the outputs array in the .ipynb was empty when saved, the restored file will show empty outputs even though the IDE may have displayed results in the UI before the snapshot. Local History does not omit outputs; it stores whatever was in the file.
outputs array. Non-empty arrays mean outputs were saved at snapshot time.Kernel state is ephemeral. Variables, imported modules, and live database connections existing at snapshot time are lost on restore. You must re-configure the interpreter, reconnect data sources, and re-run cells to recover the full interactive experience.
Assumption: behavior described applies to current DataSpell releases where Local History works as JetBrains file history. UI prompts for kernel reconnect can vary by version.
One diagnostic detail that changes the recommendation: was "Save notebook with outputs cleared" enabled for this project at the time of the snapshot? If yes, outputs will be empty by design and no restore setting will recover them without re-execution.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.