diff --git a/jupyter_server/config_manager.py b/jupyter_server/config_manager.py index 87480d7609..30d52b5bd8 100644 --- a/jupyter_server/config_manager.py +++ b/jupyter_server/config_manager.py @@ -103,7 +103,10 @@ def get(self, section_name: str, include_root: bool = True) -> dict[str, t.Any]: for path in paths: if os.path.isfile(path): with open(path, encoding="utf-8") as f: - recursive_update(data, json.load(f)) + try: + recursive_update(data, json.load(f)) + except json.decoder.JSONDecodeError: + self.log.warn("Invalid JSON in %s, skipping", path) return data def set(self, section_name: str, data: t.Any) -> None: