One of the first steps in integrating Python with SAS© Viya™ is to establish a connection with the CAS (Cloud Analytic Services) server using the SWAT (SAS© Scripting Wrapper for Analytics Transfer) library.
Although the Python code to initiate this connection is simple, it frequently fails with an error message indicating that the connection could not be established. Yet, in the same environment, everything seems to work correctly from SAS© Studio. Why this difference and how to fix it?