BookmarkSubscribeRSS Feed
ripuli
SAS Employee

Hi,

I am attempting to connect to CAS Innovation Lab with a token as documented here https://sassoftware.github.io/python-swat/getting-started.html#oauth-token

s = swat.CAS('https://innovationlab.demo.sas.com/cas-shared-default-http/', authcode="XXXX")

The acion fails with DS2 PYMAS failure in the 'execute' method

 

The SWAT version in the Innovate Lab is not 1.14 but that should not make a difference

import swat

access_token =’……….’

httpconn = swat.CAS(https://innovationlab.demo.sas.com/cas-shared-default-http/, username=None, password=access_token, ssl_ca_list="C:/Users/XXXX/OneDrive - SAS/Documents/XXXX/lab-rootCA-Intermidiates_4CLI.pem", protocol="https")

The challenge is how to use this *same code* in Model Manager (MM) and Intelligent Decisioning (ID) within the Innovation Lab.

Within the Python Code Node in Python, I tried every version documented and still received an error. It appears that the problem is how the Innovation Lab would recognise the ‘certificate’.

The issue first occurred when Viya 4 switched to accessing SWAT from ID/PW to access tokens.

I think that this error would occur with anyone using SWAT in MM/ID in any environment. I have confirmed with the Innovation Lab admins that the environment is configured to run Python.

 

When I comment out the call to SWAT, the code works. However, that does not help. When I used ID and PW to call SWAT from MM/ID, it all worked. Is there a way to keep using this workflow?

Thanks in advance.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 0 replies
  • 3043 views
  • 0 likes
  • 1 in conversation