- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I am trying to connect to SAS enterprise guide using SASPy in Python. I am getting below error:
Cannot use STDIO I/O module on Windows. Try the following: IOM
I have set the sascfg_personal.py iomcom parameter with below details:
iomcom = {
'iomhost': 'Server Machine Name'
'iomport': 8561,
'class_id': class identifier of SAS Workspace Server ,
'provider': 'sas.iomprovider',
'encoding': 'windows-1252'
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Did you install SAS Enterprise Guide or SAS Integration Technologies Client on that machine?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Yes I have enterprise guide and integration technology, both of them installed on the machine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
attaching sascfg.py
I am now trying to connect as below:
sas = saspy.SASsession(cfgname='winiomwin')
and am getting below error:
Java Error:
java.lang.NoClassDefFoundError: com/sas/services/connection/ConnectionFactoryException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.sas.services.connection.ConnectionFactoryException
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 7 more
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main"
Subprocess failed to start. Double check your settings in sascfg_personal.py file.
Attempted to run program java with the following parameters:
['java', '-classpath', E:\\SAS\\SAShome\\SASDeploymentManager\\9.4\\products\\deploywiz__94472__prt__xx__sp0__1\\deploywiz\\sas.svc.connection.jar;E:\\SAS\\SAShome\\SASDeploymentManager\\9.4\\products\\deploywiz__94472__prt__xx__sp0__1\\deploywiz\\log4j.jar;E:\\SAS\\SAShome\\SASDeploymentManager\\9.4\\products\\deploywiz__94472__prt__xx__sp0__1\\deploywiz\\sas.security.sspi.jar;E:\\SAS\\SAShome\\SASDeploymentManager\\9.4\\products\\deploywiz__94472__prt__xx__sp0__1\\deploywiz\\sas.core.jar;C:\\Users\\XXXX\\AppData\\Local\\Programs\\Python\\Python37-32\\Lib\\site-packages\\saspy\\java\\saspyiom.jar', 'pyiom.saspy2j', '-host', 'localhost', '-stdinport', '58234', '-stdoutport', '58235', '-stderrport', '58236', '-iomhost', 'XXXX', '-iomport', '8561', '-user', 'XXXX', '-lrecl', '1048576', ''] If no Java Error above, try running the following command (where saspy is running) manually to see if it's a problem starting Java: java -classpath "E:\SAS\SAShome\SASDeploymentManager\9.4\products\deploywiz__94472__prt__xx__sp0__1\deploywiz\sas.svc.connection.jar;E:\SAS\SAShome\SASDeploymentManager\9.4\products\deploywiz__94472__prt__xx__sp0__1\deploywiz\log4j.jar;E:\SAS\SAShome\SASDeploymentManager\9.4\products\deploywiz__94472__prt__xx__sp0__1\deploywiz\sas.security.sspi.jar;E:\SAS\SAShome\SASDeploymentManager\9.4\products\deploywiz__94472__prt__xx__sp0__1\deploywiz\sas.core.jar;C:\Users\XXXX\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\saspy\java\saspyiom.jar" pyiom.saspy2j -host localhost -stdinport 58234 -stdoutport 58235 -stderrport 58236 -iomhost XXXXX-iomport 8561 -user XXXX -lrecl 1048576
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I seriously doubt you could connect to Enterprise Guide. You should be able to connect to the same SAS server that EG is using.
Which looks like what you are actually trying to do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for replying, I have now manged to log in, the problem was in the path of the jar files, I didn't change the path completely. Also the port required was of SAS workspace server, i was providing that of meta data erver as visible in EG login details.
Yes the log in is to the SAS server.
Thanks
Sourav
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Im facing an issue ‘No sas process attached’ sas process has terminated unexpectedly
I did add the sspiauth.dll files path
I just have sas eg installed on my system.. please help me with the steps to follow while making changes to cfg file
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If you use Enterprise Guide to connect to a remote server, you would likely want to use the IOM using Java option to connect the same way in sasPy.
https://sassoftware.github.io/saspy/install.html
Greg Wootton | Principal Systems Technical Support Engineer