Hi:
We are using a tool that launch Python containers in separate sessions (CDSW, Cloudera Data Science Workbench). I was able to install saspy with `pip install `and edit the `sascfg_personal.py` in the session a proof of concept. This is my sascfg_personal.py configuration:
However, when I try to launch a session from a Jupter notebook, I got the following error
sas = saspy.SASsession(cfg="iomlinux") Using SAS Config named: iomlinux StdinNotImplementedError: raw_input was called, but this frontend does not support input requests. StdinNotImplementedError Traceback (most recent call last) in engine ----> 1 sas = saspy.SASsession(cfg="iomlinux") /home/cdsw/.local/lib/python3.6/site-packages/saspy/sasbase.py in __init__(self, **kwargs) 556 raise SASIONotSupportedError(self.sascfg.mode, alts=['IOM']) 557 elif self.sascfg.mode == 'IOM': --> 558 self._io = SASsessionIOM(sascfgname=self.sascfg.name, sb=self, **kwargs) 559 elif self.sascfg.mode == 'COM': 560 self._io = SASSessionCOM(sascfgname=self.sascfg.name, sb=self, **kwargs) /home/cdsw/.local/lib/python3.6/site-packages/saspy/sasioiom.py in __init__(self, **kwargs) 293 self.sascfg = SASconfigIOM(self, **kwargs) 294 --> 295 self._startsas() 296 self._sb.reconuri = None 297 /home/cdsw/.local/lib/python3.6/site-packages/saspy/sasioiom.py in _startsas(self) 373 374 while len(user) == 0: --> 375 user = self.sascfg._prompt("Please enter the OMR user id: ") 376 if user is None: 377 self.sockin.close() /home/cdsw/.local/lib/python3.6/site-packages/saspy/sasbase.py in _prompt(self, prompt, pw) 367 if not pw: 368 try: --> 369 return input(prompt) 370 except KeyboardInterrupt: 371 return None /var/lib/cdsw/python3-engine-deps/lib/python3.6/site-packages/ipykernel/kernelbase.py in raw_input(self, prompt) 687 if not self._allow_stdin: 688 raise StdinNotImplementedError( --> 689 "raw_input was called, but this frontend does not support input requests." 690 ) 691 return self._input_request(str(prompt), StdinNotImplementedError: raw_input was called, but this frontend does not support input requests.
I've tried to do some research but I haven't found a solution. I don't know if it helps, but according to the container session, the python version is Python 3
The top of the tool also shows Python 3 Session.
However, when I go to the Terminal Access, it shows two Pythons versions available. I don't know if it helps.
Best regards,
Javier
Also, looking at what you have in your config definition, you are providing the appserver key, but the value isn't correct. I don't know if you even need that, do you have multiple that an object spawner can spawn? If so, you have to put the correct name like in the documentation:
appserver -
If you have more than one AppServer defined on OMR, then you must pass the name of the physical workspace server that you want to connect to, i.e.: ‘SASApp - Workspace Server’. Without this the Object spawner will only try the first one in the list of app servers it supports.
I would comment that out to start with, and if SASApp is the name of the appserver you're trying to connect to, then it would need to be specified as ‘SASApp - Workspace Server’, but again, I'm not sure you need this; I don't know how your object spawners are configured.
Just the next thing I see.
Hii:
I think you were right. Unfortunately, I've got another error in the Cloudera Data Science Workbench.
Thank you in advance.
I found a little typo. On Linux, I have to use : (colon) in place of ; (semicolon) as the path separator in Java options. Now I've got a different error. This is my sascfg_personal.py
This is the location of the jars:
This is the result I've got from a manual run in the Terminal:
Hope this log helps to find the error. Thank you @sastpw @gwootton again for your quick responses in all my SASPy posts 😄
It looks like you're trying to code your own classpath, and it also looks like you've manipulated the saspy deployment to move files around to try to match what you're coding in your classpath, which is wrong, based upon just looking at these various pictures you're posted. Why are you coding a classpath? That's been unnecessary/wrong for like 3 years now (https://sassoftware.github.io/saspy/configuration.html#attn-as-of-saspy-version-3-3-3-the-classpath-...). This latest error is due to the classpath being wrong, or something with moving the files around being wrong.
I guess I'd uninstall saspy, reinstall it and try a configuration based upon the doc, which is possibly what you have without moving files around and without coding a classpath. And the other thing about this environment not seeming to support prompting seemed correct, so use the authinfo file (https://sassoftware.github.io/saspy/configuration.html#the-authinfo-file-authinfo-on-windows) to provide your credentials to work around that problem with the environment. Be curious to see what other issues you may find; never heard of this particular environment so curious to see what other issues you happen upon, or hopefully, not!
Thank you @sastpw , now I understand that the guide has detailed solutions. Unfortunately, I did a fresh install in another session, these were my steps:
I created two files in my home: ".authinfo" and "sascfg_linux.py"
That's it. It seems suspicious that hangs after Socket InputStream class, like if it was waiting some response. How can I debug more to find out the error?
I checked that the CDSW server has communication to the SAS IOM host/port and it was ok
Best regards,
Javier
Correct, the doc showing this error is here: https://sassoftware.github.io/saspy/troubleshooting.html#java-problems
The error is that it can't find the java executable you provided, you need to provide the full path
The OS Error was: The system cannot find the file specified
Also, it look like you didn't set the permissions right on the .authinfo file. I think it requires 600 for it to be used. If you get a failure about not being able to get at it, after providing a valid java path, then you may need to remove the 'x' from that.
Also, looking at what you have in your config definition, you are providing the appserver key, but the value isn't correct. I don't know if you even need that, do you have multiple that an object spawner can spawn? If so, you have to put the correct name like in the documentation:
appserver -
If you have more than one AppServer defined on OMR, then you must pass the name of the physical workspace server that you want to connect to, i.e.: ‘SASApp - Workspace Server’. Without this the Object spawner will only try the first one in the list of app servers it supports.
I would comment that out to start with, and if SASApp is the name of the appserver you're trying to connect to, then it would need to be specified as ‘SASApp - Workspace Server’, but again, I'm not sure you need this; I don't know how your object spawners are configured.
Just the next thing I see.
Awesome, that's great!
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
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.