made imports more robust
This commit is contained in:
@@ -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}")
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user