Skip to content

Commit

Permalink
Merge pull request #753 from thewtex/imjoy-jupyterlab-check
Browse files Browse the repository at this point in the history
BUG: imjoy_jupyterlab_extension argument to import_module
  • Loading branch information
thewtex authored May 17, 2024
2 parents cf45ed7 + a352010 commit 9dce163
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions itkwidgets/integrations/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,12 @@ def find_env():
# jupyterlab may not be available
pass
try:
import_module("imjoy-jupyterlab-extension")
import_module("imjoy_jupyterlab_extension")
except ModuleNotFoundError:
try:
import_module("imjoy_jupyterlab_extension")
except ModuleNotFoundError:
if ENVIRONMENT is Env.JUPYTERLITE:
raise RuntimeError('imjoy-jupyterlab-extension is required. Install the package and refresh page.')
elif sys.version_info.minor > 7:
raise RuntimeError('imjoy-jupyterlab-extension is required. `pip install itkwidgets[lab]` and refresh page.')
if ENVIRONMENT is Env.JUPYTERLITE:
raise RuntimeError('imjoy-jupyterlab-extension is required. Install the package and refresh page.')
elif sys.version_info.minor > 7:
raise RuntimeError('imjoy-jupyterlab-extension is required. `pip install itkwidgets[lab]` and refresh page.')

try:
import imjoy_elfinder
Expand Down

0 comments on commit 9dce163

Please sign in to comment.