Hi Team,
I am trying to do the Python SDK Transformations course and got stuck here when running the code, can you please help me what I am missing here?
Thanks,
Navyasri Indupalli
Best answer by Sofie Haug
View originalHi Team,
I am trying to do the Python SDK Transformations course and got stuck here when running the code, can you please help me what I am missing here?
Thanks,
Navyasri Indupalli
Best answer by Sofie Haug
View originalHi
We would need some more info to be able to help. The entire error message (or at least the last lines of it) would be helpful
Hi Sofie,
Thanks for replying back, I am getting this error message
One thing I notice is that in one place you use “api” (in the scope) and in the CDF_CLUSTER you have westeurope-1.
I will also need to take a closer look into this myself.
I also see that you are trying to use the “publidata” cdf project, while the courses uses a different one. The client secret you generated in the course can only be used to access that specific project.
Should I need to change the CDF_CLUSTER value, I have given that value from some of the discussions in the communtiy hub
credentials = OAuthClientCredentials(
token_url=os.environ["COGNITE_TOKEN_URL"],
client_id=os.environ["COGNITE_CLIENT_ID"],
client_secret=os.environ["COGNITE_CLIENT_SECRET"],
scopes=os.environ["COGNITE_TOKEN_SCOPES"],
)
cnf = ClientConfig(
client_name="my-special-client",
project=os.environ["COGNITE_PROJECT"],
base_url=os.environ["COGNITE_BASE_URL"],
credentials=credentials,
)
Can you suggest what values shoud be given in this piece of code for the particular variables?
If you do the Python SDK Transformations course I recommend using the notebook linked in the course, where you have already some authentications set up
I have used the notebook suggested in the course but they mentioned the same code where the variables are declared like this in that notebook.
The Match Entities with Python SDK course is a demonstration and doesn’t have any hands-on to it. The notebook attached can be used, but you would need access to a cdf project (your own/ your company’s). We unfortunately don’t have an environment for this.
Yes, Sofie.
I am also rechecking the course for the notebook and found another notebook, I am going through that notebook now. Will reach out again if I stuck anywhere.
Thanks for replying back to me patiently.
Sofie, Have you send any notebook to me?
If yes, I am not able to find that!
You find the link to the notebook here: https://learn.cognite.com/python-sdk-transformations/1469463
the link in the lesson takes you to a GitHub repository. You need to clone the repository. If you are unsure of how, please check this documentation from GitHub: https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.