Hello all,
In a server (without internet connection), I have a JSL script that calls at some point a python script (in a virtual environment). Below is the JSL command that calls the python. The python is stored in a F:\ Disk.
strCommand = “Path\to\virutual_env\.venv\Scripts\activate.bat\!” && python \!“Path\to\python_script.py\!””;
Run Program( Executable( “cmd.exe” ), Options( “/C ” || strCommand ) );However, if I run this JSL code on the server, it doesn't work anymore. No python is run, but no error message.
For information: as I don't have Internet access, for the python virtual environment I manually transferred the packages to the server and activated the environment to read the packages.
Anyone had the same issue ?
Do you have the same paths on your PC and on the server? Does either of them have any spaces in the paths (there could potentially be some issues with the quotes when using Run Program)? Start breaking the problem into smaller parts:
Do you have the same paths on your PC and on the server? Does either of them have any spaces in the paths (there could potentially be some issues with the quotes when using Run Program)? Start breaking the problem into smaller parts:
Hello,
Thank you very much! In fact, the problem was that there was a space in the path
How did you solve that issue? Did you "fix" the file path or try to figure out how it should be quoted for JMP / commandline to understand what you are trying to do?
As I had to do a quick fix, I first removed the spaces in the path. I must admit that I didn't come back to the subject afterwards... but I'm in discussion with JMP support. They suggest using Python from JMP18, but they don't support virtual environments, so you'd have to install the package versions directly from them. And I have customers who are ‘only’ using JMP 17 at the moment and would like the same thing.I'll keep you posted
Pass quote into Run Program application has one option. I have used something similar when I had to pass quotes to Run Program and if I remember correctly also some other methods.
https://community.jmp.com/t5/Discussions/Unable-to-parse-speechmarks-quot-quot-into-powershell-using... ( in Unable to parse speechmarks "" into powershell using RunProgram ) has links to an explanation of why the windows command line quoting is so hard. Removing the spaces in a path name is a great choice.