diff --git a/syft/sync/login.py b/syft/sync/login.py index b669159dfd8..e7a43d12363 100644 --- a/syft/sync/login.py +++ b/syft/sync/login.py @@ -82,7 +82,8 @@ def _resolve_login_params( token_path = token_path or settings.token_path if not token_path: raise NotImplementedError( - "Jupyter login is only supported with a token path" + "Running outside Colab: pass token_path=... to login_do()/login_ds(). " + "See docs/auth.md to create a token (about 15 minutes)." ) if email is None: raise ValueError("Email is required for Jupyter login") diff --git a/tests/integration/without_unit_coverage/test_login.py b/tests/integration/without_unit_coverage/test_login.py index 55da6b486a4..7cf482c5582 100644 --- a/tests/integration/without_unit_coverage/test_login.py +++ b/tests/integration/without_unit_coverage/test_login.py @@ -178,7 +178,7 @@ def test_login_ds_missing_token_path_raises(monkeypatch): """Test that login_ds raises error when token_path is missing in Jupyter env.""" # Unset the env var so the test can verify the error is raised monkeypatch.delenv("SYFT_TOKEN_PATH", raising=False) - with pytest.raises(NotImplementedError, match="token path"): + with pytest.raises(NotImplementedError, match="token_path"): sy.login_ds( email="test@test.com", token_path=None, @@ -192,7 +192,7 @@ def test_login_do_missing_token_path_raises(monkeypatch): """Test that login_do raises error when token_path is missing in Jupyter env.""" # Unset the env var so the test can verify the error is raised monkeypatch.delenv("SYFT_TOKEN_PATH", raising=False) - with pytest.raises(NotImplementedError, match="token path"): + with pytest.raises(NotImplementedError, match="token_path"): sy.login_do( email="test@test.com", token_path=None,