Skip to main content

I’m doing the Data Scientist Basics Course using Google Colab, and I am experiencing the following issue when traying to retrieve a list: 

 

WARNING:msal.oauth2cli.authcode:Found no browser in current environment. If this program is being run inside a container which either (1) has access to host network (i.e. started by `docker run --net=host -it ...`), or (2) published port 53000 to host network (i.e. started by `docker run -p 127.0.0.1:53000:53000 -it ...`), you can use browser on host to visit the following link. Otherwise, this auth attempt would either timeout (current timeout setting is None) or be aborted by CTRL+C. Auth URI: https://login.microsoftonline.com/48d5043c-cf70-4c49-881c-c638f5796997/oauth2/v2.0/authorize?client_id=fab52bb5-9de2-4f9e-aefa-712da4b5fe00&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A53000&scope=https%3A%2F%2Fwesteurope-1.cognitedata.com%2F.default+offline_access+openid+profile&state=jrBGgqUoLhYiFfum&code_challenge=svV4STwYsFNgG3pTDKonSAFPmZS4hDos3wDmztv-3mk&code_challenge_method=S256&nonce=72843e04ab81f6f7a56acf13e31c4d5b57ea9912eba26db18330ccc0ff2bde25&client_info=1

 

The code that I run was:

import sys

from pathlib import Path

utils = str(Path("../utils").resolve())

if utils not in sys.path:

    sys.path.append(utils)

 

from cognite_auth import interactive_client

from cognite.client.config import global_config

c = interactive_client()

c.data_sets.list(limit=5)

 

I successfully authenticated using the Device Code option - Does anyone know why I am getting such warning?

@lowiso sorry for the late response. This post has been blocked by our spam filter.

@Sofie Haug will you be able to help out here?


Hi ​@lowiso Did you get by the warning?
Did you try to continue the next cell of code to see if it could block you? Since it is “only” a warning! 

Also, double check that you are connected to internet, and if I remember correctly, the Google Collab notebooks refers if you run the codes there and then, and nor wait for 1 hours and then continue. I think it kind of “closes” and wipes the memory after some time? (it’s been a while since I have used it)

Best regards, 


Reply