BookmarkSubscribeRSS Feed
Fluorite | Level 6


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 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'




SAS Employee

@SouravRoy ,


Did you install SAS Enterprise Guide or SAS Integration Technologies Client on that machine?

Fluorite | Level 6

Yes I have enterprise guide and integration technology, both of them installed on the machine. 

SAS Employee

@SouravRoy ,


Show me your file.

Fluorite | Level 6


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:

at 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 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\\;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\;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

Super User Tom
Super User

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.

Fluorite | Level 6

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.




Calcite | Level 5
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
Make sure you are using the latest version of sasPy (3.3.6 at the time of this writing) and have followed the steps to update your file with the appropriate paths for your environment, as the defaults probably do not have the correct versions.

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.
Greg Wootton | Principal Systems Technical Support Engineer

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 5 in conversation