Skip to content

Add more informative error message when opening notebook and disk is full#1444

Open
nmdanny wants to merge 2 commits into
jupyter-server:mainfrom
nmdanny:improve-error-full-disk
Open

Add more informative error message when opening notebook and disk is full#1444
nmdanny wants to merge 2 commits into
jupyter-server:mainfrom
nmdanny:improve-error-full-disk

Conversation

@nmdanny
Copy link
Copy Markdown

@nmdanny nmdanny commented Jul 24, 2024

Currently, when trying to load a jupyter notebook when the disk is full, you may see an error as follows:

image

(The reason is, opening a notebook involves SQLite updating the last_seen field in the nbsignatures table, as done by mark_trusted_cells.)

This MR gives a slightly more informative error in this scenario:

image

Comment thread jupyter_server/base/handlers.py Outdated
import mimetypes
import os
import re
import sqlite3
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a guard in case if Python build does no include sqlite3? There is one here:

try:
import sqlite3
except ImportError:
# fallback on pysqlite2 if Python was build without sqlite
from pysqlite2 import dbapi2 as sqlite3 # type:ignore[no-redef]

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@krassowski

Good catch, I also saw that these attributes were only introduced in python 3.11, so I've made this check a bit more robust, with a string based comparison as fallback

@nmdanny nmdanny force-pushed the improve-error-full-disk branch 2 times, most recently from 2e83a02 to ad184b8 Compare July 30, 2024 13:43
@Carreau Carreau added this to the Future milestone Apr 30, 2026
@Carreau Carreau force-pushed the improve-error-full-disk branch from ad184b8 to 72cd10e Compare April 30, 2026 12:16
@Carreau
Copy link
Copy Markdown
Contributor

Carreau commented Apr 30, 2026

Rebased, let's try to push this over the line.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants