From 5641cb5a7c2492e41f2fb2986f37a70e1de6757b Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Tue, 23 Feb 2021 10:36:55 +0200 Subject: [PATCH] Fix JupyterLab notebook detection --- clearml/backend_interface/task/repo/scriptinfo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clearml/backend_interface/task/repo/scriptinfo.py b/clearml/backend_interface/task/repo/scriptinfo.py index f8381273..003ec477 100644 --- a/clearml/backend_interface/task/repo/scriptinfo.py +++ b/clearml/backend_interface/task/repo/scriptinfo.py @@ -276,7 +276,8 @@ class _JupyterObserver(object): # noinspection PyPackageRequirements from nbconvert.exporters.script import ScriptExporter _script_exporter = ScriptExporter() - except Exception: + except Exception as ex: + _logger.warning('Could not read Jupyter Notebook: {}'.format(ex)) return # load pigar # noinspection PyBroadException @@ -493,7 +494,7 @@ class ScriptInfo(object): import ipykernel from glob import glob import json - for f in glob(os.path.join(os.path.dirname(ipykernel.get_connection_file()), 'nbserver-*.json')): + for f in glob(os.path.join(os.path.dirname(ipykernel.get_connection_file()), '??server-*.json')): # noinspection PyBroadException try: with open(f, 'r') as json_data: