From fbc8b63041b0c2c2bbac4aec618e74ee92af63c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Bu=C3=9F?= <74214064+lenwevader@users.noreply.github.com> Date: Fri, 15 Nov 2024 15:05:45 +0100 Subject: [PATCH] Excepting HTTPError when Notebook information cannot be read (#49) * Excepting HTTPError when Notebook information cannot be read --- src/arpes/utilities/jupyter.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/arpes/utilities/jupyter.py b/src/arpes/utilities/jupyter.py index 750010ff..a7a1285c 100644 --- a/src/arpes/utilities/jupyter.py +++ b/src/arpes/utilities/jupyter.py @@ -10,6 +10,7 @@ from os import SEEK_END from pathlib import Path from typing import TYPE_CHECKING, Required, TypedDict, TypeVar +from urllib.error import HTTPError import ipykernel from IPython.core.getipython import get_ipython @@ -127,6 +128,8 @@ def get_full_notebook_information() -> NoteBookInfomation | None: } except (KeyError, TypeError): pass + except HTTPError: + logger.debug("Could not read notebook information") return None