diff --git a/src/cristallina/__init__.py b/src/cristallina/__init__.py index adbaad2..e35826b 100644 --- a/src/cristallina/__init__.py +++ b/src/cristallina/__init__.py @@ -15,10 +15,16 @@ except PackageNotFoundError: # pragma: no cover finally: del version, PackageNotFoundError +try: -from . import utils -from . import plot -from . import analysis -from . import image -from . import channels -from . import uscan + from . import utils + from . import plot + from . import analysis + from . import image + from . import channels + from . import uscan + +except (ImportError, ModuleNotFoundError) as e: + # Handle the case where the package is not installed + # or if there are issues with the imports + print(f"Error importing modules: {e}") diff --git a/src/cristallina/jupyter_helper.py b/src/cristallina/jupyter_helper.py index 83d8b32..9594e18 100644 --- a/src/cristallina/jupyter_helper.py +++ b/src/cristallina/jupyter_helper.py @@ -30,7 +30,7 @@ class MySQLiteYStore(SQLiteYStore): """ Custom SQL location for jupyter collaboration to avoid NFS locking issues. """ - suffix = random.randint(1E9, 9E9) + suffix = random.randint(int(1E9), int(9E9)) if os.path.isdir('/scratch'): # We are on RA and should use the scratch space here db_path = f"/scratch/ystore_{suffix}.db"