import saspy
import pandas as pd
sas = saspy.SASsession(cfgname='winlocal')
w_class = sas.sasdata("CLASS","SASHELP")
w_class.describe() We failed in getConnection
The application could not log on to the server "localhost:0". Integrated Windows authentication failed.
SAS process has terminated unexpectedly. RC from wait was: 4294967290
SASIOConnectionTerminated Traceback (most recent call last)
Cell In[2], line 3
1 import saspy
2 import pandas as pd
----> 3 sas = saspy.SASsession(cfgname='winlocal')
4 w_class = sas.sasdata("CLASS","SASHELP")
5 w_class.describe()
File ~\AppData\Local\anaconda3\Lib\site-packages\saspy\sasbase.py:594, in SASsession.__init__(self, **kwargs)
592 raise SASIONotSupportedError(self.sascfg.mode, alts=['IOM'])
593 elif self.sascfg.mode == 'IOM':
--> 594 self._io = SASsessionIOM(sascfgname=self.sascfg.name, sb=self, **kwargs)
595 elif self.sascfg.mode == 'COM':
596 self._io = SASSessionCOM(sascfgname=self.sascfg.name, sb=self, **kwargs)
File ~\AppData\Local\anaconda3\Lib\site-packages\saspy\sasioiom.py:317, in SASsessionIOM.__init__(self, **kwargs)
314 self._tomods1 = b"_tomods1"
315 self.sascfg = SASconfigIOM(self, **kwargs)
--> 317 self._startsas()
318 self._sb.reconuri = None
File ~\AppData\Local\anaconda3\Lib\site-packages\saspy\sasioiom.py:582, in SASsessionIOM._startsas(self)
580 if enc == '':
581 self.sascfg.encoding = 'utf-8'
--> 582 ll = self.submit("options svgtitle='svgtitle'; options validvarname=any validmemname=extend pagesize=max nosyntaxcheck; ods graphics on;", "text")
583 self.sascfg.encoding = enc
585 if self.pid is None:
File ~\AppData\Local\anaconda3\Lib\site-packages\saspy\sasioiom.py:992, in SASsessionIOM.submit(self, code, results, prompt, **kwargs)
990 #return dict(LOG=log.decode(errors='replace'), LST='')
991 logger.fatal(log.decode(errors='replace'))
--> 992 raise SASIOConnectionTerminated(Exception)
993 except subprocess.TimeoutExpired:
994 pass
SASIOConnectionTerminated: No SAS process attached. SAS process has terminated unexpectedly.
<class 'Exception'> #sascfg_personal.py
import os
os.environ["PATH"] += ";C:\\Program Files\\SASHome\\SASFoundation\\9.4\\core\\sasext"
SAS_config_names=['winlocal']
default = {'saspath' : '/opt/sasinside/SASHome/SASFoundation/9.4/bin/sas_u8' }
winlocal = {'java' : 'C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe', 'encoding' : 'windows-1252'} Currently, I am unable to connect SASPy (Version: 5.103.0) to SAS (Version 9.04.01M7P080520) in Jupyter Lab (Version 4.2.5) on my Dell laptop (Windows 10), although the SASPy connection had been working fine until I updated my SAS license this week. On my second laptop (lenovo with Windows 10) with the same updated license, the SASPy connection to SAS in Jupyter lab has worked fine, as before. Any help toward the SASPy connection issue with SAS (as referred to Dell laptop above) will be highly apprreciated.
... View more