BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
a20121248
Obsidian | Level 7

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:

a20121248_0-1679426906737.pnga20121248_1-1679426957008.png

 

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.

a20121248_2-1679426992012.png

 

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

a20121248_0-1679426335384.png

a20121248_1-1679426386232.png
The top of the tool also shows Python 3 Session.

a20121248_2-1679426405458.png

However, when I go to the Terminal Access, it shows two Pythons versions available. I don't know if it helps.

a20121248_4-1679426603756.png

 

Best regards,

Javier

1 ACCEPTED SOLUTION

Accepted Solutions
sastpw
SAS Employee

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. 

 

View solution in original post

11 REPLIES 11
gwootton
SAS Super FREQ
I think it's trying to prompt for your credentials to log in and it's throwing an error that it can't ask for your input.
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
a20121248
Obsidian | Level 7

Hii:

I think you were right. Unfortunately, I've got another error in the Cloudera Data Science Workbench.

 

a20121248_1-1679430047626.png

a20121248_2-1679430081762.png

 

Thank you in advance.

 

 

gwootton
SAS Super FREQ
It looks like when saspy is trying to run the command:
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
a20121248
Obsidian | Level 7

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

a20121248_1-1679442749855.png

a20121248_0-1679443406848.png

This is the location of the jars:

a20121248_1-1679443459314.png

 

 

a20121248_0-1679442710271.png

This is the result I've got from a manual run in the Terminal:

a20121248_2-1679443228761.png

 

Hope this log helps to find the error. Thank you @sastpw @gwootton again for your quick responses in all my SASPy posts 😄

sastpw
SAS Employee

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!

a20121248
Obsidian | Level 7

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:

 

  1. We use CDSW to launch Python sessions (it works with pods/containers).
    a20121248_5-1679466116792.png
    And we have remote SAS 9.4 Linux server.
    a20121248_3-1679466003429.png
  2. I created two files in my home: ".authinfo" and "sascfg_linux.py"

    a20121248_1-1679465444075.png
  3. I created a Python script "prueba.py"
    a20121248_6-1679466241001.png

     

  4. After execution, I immediately got an error
    a20121248_7-1679466486333.png

  5. 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:
    a20121248_8-1679467002875.png
    I've tried to run with verbose option to more detail
    a20121248_9-1679467118362.pnga20121248_10-1679467157415.png

     

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

a20121248_11-1679467419862.png

a20121248_14-1679467544952.png

 

Best regards,

Javier

gwootton
SAS Super FREQ
Can you provide the full path to the java executable in your cfg? The error is saying it can't find the file.
--
Greg Wootton | Principal Systems Technical Support Engineer
sastpw
SAS Employee

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.

sastpw
SAS Employee

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. 

 

a20121248
Obsidian | Level 7

THANK YOU

The last error was the SASApp, it wasn't needed.

a20121248_0-1679496391899.png

Thank you @gwootton and @sastpw for your support.

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
  • 11 replies
  • 2535 views
  • 9 likes
  • 3 in conversation