Page 1 of 1

Directory name is invalid?

Posted: Wed Nov 30, 2016 2:06 pm
by chester
Unable to create process: The directory name is invalid.

I am trying to use the spawn command to execute a Python script from my EViews program.
The file directory clearly exists as I am in it right now.
What could possibly be the reason here? Code below:

Code: Select all

%command = " python ""P:\Folder1\Folder2\script.py"" "+ """"+vectorStr+"""" spawn {%command}

Re: Directory name is invalid?

Posted: Wed Nov 30, 2016 2:56 pm
by EViews Matt
Hello,

My first thought is that this is an issue with launching python, not your python script. Perhaps the python installer didn't add its executables directory to the PATH environment variable. As a quick check, try opening a command prompt and running the command "python". An error about python not being a recognized command will verify a PATH issue. An easy fix in EViews is to always use the full path to the python executable instead of just "python".