- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Perhaps you can provide your credentials so it doesn't need to prompt you?
https://sassoftware.github.io/saspy/configuration.html#authentication
Greg Wootton | Principal Systems Technical Support Engineer
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hii:
I think you were right. Unfortunately, I've got another error in the Cloudera Data Science Workbench.
Thank you in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
java -classpath ...
it is returned an error "Permission Denied"
So I'm thinking maybe your python solution doesn't have permission to fork a process like that? I think if the problem was with the provided credentials it would say access denied instead of permission denied.
Greg Wootton | Principal Systems Technical Support Engineer
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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 😄
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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:
- We use CDSW to launch Python sessions (it works with pods/containers).
And we have remote SAS 9.4 Linux server. -
I created two files in my home: ".authinfo" and "sascfg_linux.py"
- I created a Python script "prueba.py"
- After execution, I immediately got an error
- As suggested in the log, I executed the command manually from Terminal. Since it's too long for clipboard, I created a shell that executes the java classpath command. Unfortunately it hangs (no error message) and never ends:
I've tried to run with verbose option to more detail
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Greg Wootton | Principal Systems Technical Support Engineer
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Awesome, that's great!