Comments (8)
@torstendahlen are you up and running? We can close this if so. Unless you have other questions or issues.
Thanks,
Tom
from sas_kernel.
Hey, this is because 'java' isn't being found. See it in the troubleshooting guide here: https://sassoftware.github.io/saspy/troubleshooting.html#java-problems
So java.exe isnt' in your Path variable, do it's not being found. If you specify the full path to it in yout configuration definition for the java key, that will solve this:
'java' : 'C:\Wherever\java\is\java.exe',
Tom
from sas_kernel.
Thanks for your prompt answer Tom!
However, I still cannot get this to work. Using saspy i can create a connection using 'java' as only path:
sas = saspy.SASsession(cfgname='winlocal', results='HTML', java='java')
β
βThe SAS Config name specified was not found. Please enter the SAS Config you wish to use. Available Configs are: ['autogen_winlocal'] autogen_winlocal
SAS Connection established. Subprocess id is 9660
However, using the sas_kernel in JN instead of python kernel I get:
proc print data=sashelp.cars;run;
The OS Error was:
The system cannot find the file specified
SAS Connection failed. No connection established. Double check your settings in sascfg_personal.py file.
Attempted to run program javaC:\Program Files (x86)\Java\jre1.8.0_25in\java.exe with the following parameters:['javaC:\Program Files (x86)\Java\jre1.8.0_251\x08in\java.exe', '-classpath', 'C:\Program Files\SASHome\SASDeploymentManager\9.4\products\deploywiz__94518__prt__xx__sp0__1\deploywiz\sas.core.jar;C:\Program Files\SASHome\SASDeploymentManager\9.4\products\deploywiz__94518__prt__xx__sp0__1\deploywiz\log4j.jar;C:\Program Files\SASHome\SASDeploymentManager\9.4\products\deploywiz__94518__prt__xx__sp0__1\deploywiz\sas.svc.connection.jar;C:\Program Files\SASHome\SASDeploymentManager\9.4\products\deploywiz__94518__prt__xx__sp0__1\deploywiz\sas.security.sspi.jar;H:\anaconda\lib\site-packages\saspy\java\saspyiom.jar', 'pyiom.saspy2j', '-host', 'localhost', '-stdinport', '50602', '-stdoutport', '50603', '-stderrport', '50604', '-zero', '-lrecl', '1048576', '']
If no OS Error above, try running the following command (where saspy is running) manually to see what is wrong:
javaC:\Program Files (x86)\Java\jre1.8.0_25in\java.exe -classpath "C:\Program Files\SASHome\SASDeploymentManager\9.4\products\deploywiz__94518__prt__xx__sp0__1\deploywiz\sas.core.jar;C:\Program Files\SASHome\SASDeploymentManager\9.4\products\deploywiz__94518__prt__xx__sp0__1\deploywiz\log4j.jar;C:\Program Files\SASHome\SASDeploymentManager\9.4\products\deploywiz__94518__prt__xx__sp0__1\deploywiz\sas.svc.connection.jar;C:\Program Files\SASHome\SASDeploymentManager\9.4\products\deploywiz__94518__prt__xx__sp0__1\deploywiz\sas.security.sspi.jar;H:\anaconda\lib\site-packages\saspy\java\saspyiom.jar" pyiom.saspy2j -host localhost -stdinport 50602 -stdoutport 50603 -stderrport 50604 -zero -lrecl 1048576
No SAS process attached. SAS process has terminated unexpectedly.
Invalid response from SAS on inital submission. printing the SASLOG as diagnostic
from sas_kernel.
Hmm, Can I see your config file? It looks like you may need to be using double quotes, since your on windows. The path for java isn't right.
from sas_kernel.
Ok, here are my different versions that I have tried. Java is in my path statement, "echo %path%" and I can write 'call cmd.exe java'.
sascfg_personal _java_path.txt
sascfg_personal _standalone_java_path.txt
sascfg_personal_autogen_java.txt
sascfg_personal_original.txt
from sas_kernel.
Hey, sorry, I said 'double quotes' above, but I was thinking (trying to say) double backslashes. In windows, a slash followed by a handful of other charters are considered escape sequences; If you notice the classpaths in your files all have '\\' between the directories but in the path you specified for java, you have single slashes '\'. You need to double them up, the '\bin' in the the path, in the error posted up above, was turned into a baskspace (0x08) instead of backslash, letter b.
:\Program Files (x86)\Java\jre1.8.0_25in\java.exe with the following parameters:['javaC:\Program Files (x86)\Java\jre1.8.0_251\x08in\java.exe
So, the error is still because it can't find java.exe, as the full path, now isn't correct because of that. I see you use Anaconda. As far as java.exe being in your system path or not, anaconda has its own environments, which don't always equal window's environments. You can see the different by looking at your environment between a windows CMD prompt and an Anaconda Prompt terminal windows. So, depending on how/where/which anaconda environment your python process is running in, your environment (and what python modules are available) can vary.
One other thing, is that as of saspy V3.3.3, you no longer need the classpath in your config file. So, you can get rid of all of that too. The 4 jars that are the IOM Client code are finally in the saspy repo, so you don't need to specify where they are.
If you double up the backslashes (or prefix the string w/ an 'r' - raw string), and get rid of the class path you should be up and running. And, either Java out to work; I see you pointed at 2. Just put in the full path and that should take care of it.
Here's a (minimum) config that ought to work for you. You can use either java, and one shows r'path\path\' and the other 'path\\path\\'
SAS_config_names=["winlocal"]
winlocal = {
"java" : "C:\\Program Files (x86)\\Java\\jre1.8.0_251\\bin\\java.exe",
# "java" : r"C:\Program Files\SASHome\SASPrivateJavaRuntimeEnvironment\9.4\jre\bin\java.exe",
"encoding" : "windows-1252",
}
import os
os.environ["PATH"] += ";C:\\Program Files\\SASHome\\SASFoundation\\9.4\\core\\sasext"
Sorry for the confusion,
Tom
from sas_kernel.
Thanks ! Sorry, it has benen resolved!
from sas_kernel.
Oh, great. I'll go ahead and close this then. Just let us know if you need anything else!
Thanks,
Tom
from sas_kernel.
Related Issues (20)
- "here" hyperlink not found in improving usability section for sas_kernel HOT 2
- Unable to write to template store with proc template HOT 1
- If Python was installed with elevated privs, the package needs them too
- I can't get the result of proc step!!! HOT 6
- sas_kernel in hydrogen HOT 5
- No residual panels for PROC MIXED in Jupter Notebook HOT 3
- SAS Kernel in a terminal HOT 5
- Windows install instructions are outdated HOT 19
- SAS NBextensions for Jupyter Lab HOT 9
- SAS in Linux/Jupyter Hub Environment HOT 6
- Unable to communicate to SAS server from Jupiterhub HOT 4
- No extension provided HOT 3
- STDIO over SSH, cell output may contains extra HTML text HOT 8
- sas_kernel 2.4.6 cannot be seen in jupyter-lab after being installed successfully HOT 2
- SAS kernel failing inside Docker container with Python 3.9 HOT 18
- TypeError printed when running SAS code using the SAS Kernel. HOT 4
- Is it possible to change the default ODS HTML5 style? HOT 15
- module 'saspy' has no attribute 'SASsession' HOT 1
- Support multiple output formats HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sas_kernel.