diff --git a/cadetrdm/jupyter_functionality.py b/cadetrdm/jupyter_functionality.py index 35db56351c926e9cbec9866a07a401886d05816a..615b2c39d36a114641515352f1f2575ec9df1eef 100644 --- a/cadetrdm/jupyter_functionality.py +++ b/cadetrdm/jupyter_functionality.py @@ -2,13 +2,19 @@ import sys import time import os from pathlib import Path +import traceback from cadetrdm.io_utils import wait_for_user from ipylab import JupyterFrontEnd import junix import nbformat as nbf -from nbconvert.preprocessors import ExecutePreprocessor -from nbconvert.nbconvertapp import NbConvertApp + +try: + from nbconvert.preprocessors import ExecutePreprocessor + from nbconvert.nbconvertapp import NbConvertApp +except ModuleNotFoundError as e: + traceback.print_exc() + print("No working nbconvert installation found OR a conflict in your packages found.") class Notebook: diff --git a/cadetrdm/repositories.py b/cadetrdm/repositories.py index 1abc0db6a542680f92b19afb6f3570e1b5a63d6f..6fc2d69d6ed8f78a286a0272960334dfe546bf28 100644 --- a/cadetrdm/repositories.py +++ b/cadetrdm/repositories.py @@ -6,7 +6,6 @@ import traceback from datetime import datetime import shutil import time -import zipfile import contextlib import glob from stat import S_IREAD, S_IWRITE @@ -611,7 +610,10 @@ class ProjectRepo(BaseRepo): super().__init__(repository_path, search_parent_directories=search_parent_directories, *args, **kwargs) with open(repository_path / "output_remotes.json", "r") as handle: - output_remotes = json.load(handle) + try: + output_remotes = json.load(handle) + except FileNotFoundError: + raise RuntimeError(f"Folder {self.working_dir} does not appear to be a CADET-RDM repository.") if output_folder is not None: print("Deprecation Warning. Setting the outputfolder manually during repo instantiation is deprecated"