BookmarkSubscribeRSS Feed
SouravRoy
Fluorite | Level 6

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'

}

 

 

8 REPLIES 8
alexal
SAS Employee

@SouravRoy ,

 

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

SouravRoy
Fluorite | Level 6

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

alexal
SAS Employee

@SouravRoy ,

 

Show me your sascfg.py file.

SouravRoy
Fluorite | Level 6

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

Tom
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.

SouravRoy
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.

 

Thanks

Sourav

narendrapendem1
Calcite | Level 5
Hello
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
gwootton
SAS Super FREQ
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 sascfg_personal.py 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.

https://sassoftware.github.io/saspy/install.html
--
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 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 8 replies
  • 6523 views
  • 0 likes
  • 5 in conversation