saspy ArcGIS Pro Notebook and Jupyter Notebook Connection to ODA (On Demand for Academics) Fails

753
1
Jump to solution
01-24-2023 03:54 PM
LarrySpear
New Contributor III

I'm having trouble using saspy in ArcGIS Pro Notebook and also Jupyter notebook connecting to the ODA (On Demand for Academics) resource. I get the following error. I have followed several instructions for the sascfg_personal.py and the _authinfo file with no success. Here is the error message:

import saspy
sas_session = saspy.SASsession()
sas_session

Using SAS Config named: oda
We failed in getConnection
An exception was thrown during the encryption key exchange.

SAS process has terminated unexpectedly. RC from wait was: 4294967290
SAS Connection failed. No connection established. Double check your settings in sascfg_personal.py file.

Attempted to run program C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe with the following parameters:['C:\\Program Files (x86)\\Common Files\\Oracle\\Java\\javapath\\java.exe', '-classpath', 'C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\saspy\\java\\saspyiom.jar;C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\saspy\\java\\iomclient\\log4j-1.2-api-2.17.1.jar;C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\saspy\\java\\iomclient\\log4j-api-2.17.1.jar;C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\saspy\\java\\iomclient\\log4j-core-2.17.1.jar;C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\saspy\\java\\iomclient\\sas.security.sspi.jar;C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\saspy\\java\\iomclient\\sas.core.jar;C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\saspy\\java\\iomclient\\sas.svc.connection.jar;C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\saspy\\java\\iomclient\\sas.rutil.jar;C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\saspy\\java\\iomclient\\sas.rutil.nls.jar;C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\saspy\\java\\iomclient\\sastpj.rutil.jar;C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\saspy\\java\\thirdparty\\glassfish-corba-internal-api.jar;C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\saspy\\java\\thirdparty\\glassfish-corba-omgapi.jar;C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\saspy\\java\\thirdparty\\glassfish-corba-orb.jar;C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\saspy\\java\\thirdparty\\pfl-basic.jar;C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\envs\\arcgispro-py3\\lib\\site-packages\\saspy\\java\\thirdparty\\pfl-tf.jar', 'pyiom.saspy2j', '-host', 'localhost', '-stdinport', '57781', '-stdoutport', '57782', '-stderrport', '57783', '-iomhost', 'odaws01-usw2.oda.sas.com;odaws02-usw2.oda.sas.com;odaws03-usw2.oda.sas.com;odaws04-usw2.oda.sas.com', '-iomport', '8591', '-user', 'lspear@unm.edu/lspear', '-lrecl', '1048576', '']

No SAS process attached. SAS process has terminated unexpectedly.
Invalid response from SAS on inital submission. printing the SASLOG as diagnostic

 
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
In  [3]:
Line 2:     sas_session = saspy.SASsession()

File C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\saspy\sasbase.py, in __init__:
Line 575:   self.pyenc = sas_encoding_mapping[self.sascei]

KeyError: 'No SAS process attached. SAS process has terminated unexpectedly.'
---------------------------------------------------------------------------
0 Kudos
1 Solution

Accepted Solutions
LarrySpear
New Contributor III

I think I have found a solotion to my post. This should be useful for other SAS and ArcGIS users. It should also be helpful for those at universities that don't have or no longer have SAS licenses.  Academic users can use SAS ODA (OnDemand for Academics).

First see   SASPy Support to configure and locate these files (sascfg_personal.py and or .authinfo or _authinfo). Also note that three additional encryption jar files (Installation Note) must be added to the iomclient folder at the following path:

Program Files/ArcGIS/Pro/bin/python/envs/arcgispro-py3/Lib/site-packages/saspy/java/iomclient

I hope this helps others that are still using both SAS and Python in ArcGIS Pro.

View solution in original post

1 Reply
LarrySpear
New Contributor III

I think I have found a solotion to my post. This should be useful for other SAS and ArcGIS users. It should also be helpful for those at universities that don't have or no longer have SAS licenses.  Academic users can use SAS ODA (OnDemand for Academics).

First see   SASPy Support to configure and locate these files (sascfg_personal.py and or .authinfo or _authinfo). Also note that three additional encryption jar files (Installation Note) must be added to the iomclient folder at the following path:

Program Files/ArcGIS/Pro/bin/python/envs/arcgispro-py3/Lib/site-packages/saspy/java/iomclient

I hope this helps others that are still using both SAS and Python in ArcGIS Pro.