From fe3e35f5cc676f6a9d6c03ca39a736ff574ff8af Mon Sep 17 00:00:00 2001 From: Brianna Major Date: Mon, 14 Nov 2022 09:14:21 -0500 Subject: [PATCH] BUG: Fix check for SageMaker environment --- itkwidgets/integrations/environment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/itkwidgets/integrations/environment.py b/itkwidgets/integrations/environment.py index 990b56d4..4132592a 100644 --- a/itkwidgets/integrations/environment.py +++ b/itkwidgets/integrations/environment.py @@ -18,14 +18,14 @@ def find_env(): except: try: from IPython import get_ipython + if 'studio-lab' in get_ipython().starting_dir: + return Env.SAGEMAKER parent_header = get_ipython().parent_header username = parent_header['header']['username'] if username == '': return Env.JUPYTERLAB elif username == 'username': return Env.JUPYTER_NOTEBOOK - else: - return Env.SAGEMAKER except AttributeError: try: import js