From 60d7ccaccd2a891b6c97bffd37d50f25194a6c81 Mon Sep 17 00:00:00 2001 From: Luciano Resende Date: Tue, 21 Mar 2023 09:01:39 -0700 Subject: [PATCH] Fix calculation of schema location (#1239) Co-authored-by: Zachary Sailer Co-authored-by: Steven Silvester --- jupyter_server/serverapp.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jupyter_server/serverapp.py b/jupyter_server/serverapp.py index 8427703634..8348129736 100644 --- a/jupyter_server/serverapp.py +++ b/jupyter_server/serverapp.py @@ -1968,10 +1968,9 @@ def init_event_logger(self): ] for schema_id in schema_ids: # Get the schema path from the schema ID. - rel_schema_path = schema_id.lstrip(JUPYTER_SERVER_EVENTS_URI) + ".yaml" + rel_schema_path = schema_id.replace(JUPYTER_SERVER_EVENTS_URI + "/", "") + ".yaml" schema_path = DEFAULT_EVENTS_SCHEMA_PATH / rel_schema_path # Use this pathlib object to register the schema - # breakpoint() self.event_logger.register_event_schema(schema_path) def init_webapp(self):