Usage Note 63780: The error "The system cannot find the file specified" occurs after you try to start a SASPy session
After you attempt to start a SAS® session that uses the SASPy interface, the following error appears in your command-line window:
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 C:\Program Files (x86)\Java\jre1.8.0_15in\java.exe with the following parameters:['C:\\Program Files (x86)\\Java\\jre1.8.0_151\x08in\\java.exe', '-classpath', 'C:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\deploywiz__94400__prt__xx__sp0__1\\deploywiz\\sas.svc.connection.jar;C:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\deploywiz__94400__prt__xx__sp0__1\\deploywiz\\sas.security.sspi.jar;C:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\deploywiz__94400__prt__xx__sp0__1\\deploywiz\\log4j.jar;C:\\Program Files\\SASHome\\SASDeploymentManager\\9.4\\products\\deploywiz__94400__prt__xx__sp0__1\\deploywiz\\sas.core.jar;C:\\Program Files\\Python36\\Lib\\site-packages\\saspy\\java\\saspyiom.jar', 'pyiom.saspy2j', '-host', 'localhost', '-stdinport', '61698', '-stdoutport', '61699', '-stderrport', '61700', '-zero', '-lrecl', '1048576', '']
If no OS Error above, try running the following command (where saspy is running) manually to see what is wrong:
C:\Program Files (x86)\Java\jre1.8.0_15in\java.exe -classpath "C:\Program Files\SASHome\SASDeploymentManager\9.4\products\deploywiz__94400__prt__xx__sp0__1\deploywiz\sas.svc.connection.jar;C:\Program Files\SASHome\SASDeploymentManager\9.4\products\deploywiz__94400__prt__xx__sp0__1\deploywiz\sas.security.sspi.jar;C:\Program Files\SASHome\SASDeploymentManager\9.4\products\deploywiz__94400__prt__xx__sp0__1\deploywiz\log4j.jar;C:\Program Files\SASHome\SASDeploymentManager\9.4\products\deploywiz__94400__prt__xx__sp0__1\deploywiz\sas.core.jar;C:\Program Files\Python36\Lib\site-packages\saspy\java\saspyiom.jar" pyiom.saspy2j -host localhost -stdinport 61698 -stdoutport 61699 -stderrport 61700 -zero -lrecl 1048576
Note: The error that you see will not match the error above exactly, but it should be similar.
The error above is caused by an issue with your Java settings in your SASPy configuration file. Make sure that you have at least Java 7 installed. To resolve the issue, follow the instructions below. You need administrative privileges to take these steps:
- Verify the version of Java that you have installed by opening a command-line interface and entering java -version. If the returned value is 1.7 or later, proceed to the next steps.
- Navigate to your sascfg_personal.py configuration file. The file is usually located in Python-directory/Lib/site-packages/saspy. Record the directory path for this file.
- Open your text editor of choice in administrative mode. Open the sascfg_personal.py file.
- Find the line where "java" is located and record the value after the colon (:).
- If there is no value after the colon, verify that Java is included in your environment variables.
- Open a command-line window and type where java. This command lists your Java executable location.
- Verify that the Java executable location is listed in your PATH environment variables. If it is and you are still experiencing issues with SASPy, contact SAS Technical Support.
- If the Java executable location is not in the PATH environment variable, add the path to your PATH environment variables.
- Restart a SAS session using SASPy.
You can also include your Java executable location in your SASPy configuration file:
- Open a command-line interface and type where java. Record the directory path that is displayed..
- Open your sascfg_personal.py file and find the line where "java" is located.
- After the colon (:), enter the location for your Java executable (which you recorded in Step 1). Be sure to contain your path within double quotation marks, as shown here:
"C:\ProgramData\Oracle\Java\javapath\java.exe"
- Save your sascfg_personal.py file.
- Restart a SAS session using SASPy.
If you are still experiencing issues, send a screenshot of the error message and your SASPy configuration file to SAS Technical Support.
Operating System and Release Information
| SAS System | Base SAS | Microsoft Windows 8 Enterprise x64 | 9.4 | | 9.4 TS1M0 | |
| Microsoft® Windows® for x64 | 9.4 | | 9.4 TS1M0 | |
| Microsoft Windows 8 Pro x64 | 9.4 | | 9.4 TS1M0 | |
| Microsoft Windows 8.1 Enterprise 32-bit | 9.4 | | 9.4 TS1M0 | |
| Microsoft Windows 8.1 Enterprise x64 | 9.4 | | 9.4 TS1M0 | |
| Microsoft Windows 8.1 Pro 32-bit | 9.4 | | 9.4 TS1M0 | |
| Microsoft Windows 8.1 Pro x64 | 9.4 | | 9.4 TS1M0 | |
| Microsoft Windows 10 | 9.4 | | 9.4 TS1M0 | |
| Microsoft Windows Server 2008 R2 | 9.4 | | 9.4 TS1M0 | |
| Microsoft Windows Server 2008 for x64 | 9.4 | | 9.4 TS1M0 | |
| Microsoft Windows Server 2012 Datacenter | 9.4 | | 9.4 TS1M0 | |
| Microsoft Windows Server 2012 R2 Datacenter | 9.4 | | 9.4 TS1M0 | |
| Microsoft Windows Server 2012 R2 Std | 9.4 | | 9.4 TS1M0 | |
| Microsoft Windows Server 2012 Std | 9.4 | | 9.4 TS1M0 | |
| Windows 7 Enterprise x64 | 9.4 | | 9.4 TS1M0 | |
| Windows 7 Professional x64 | 9.4 | | 9.4 TS1M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
After you try to start a SAS® session with the SASPy interface, an error occurs: "The OS Error was: The system cannot find the file specified."
| Date Modified: | 2019-03-20 13:48:55 |
| Date Created: | 2019-03-01 16:59:23 |