Directory name is invalid?

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

chester
Posts: 44
Joined: Thu May 12, 2016 11:14 am

Directory name is invalid?

Postby chester » Wed Nov 30, 2016 2:06 pm

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}

EViews Matt
EViews Developer
Posts: 584
Joined: Thu Apr 25, 2013 7:48 pm

Re: Directory name is invalid?

Postby EViews Matt » Wed Nov 30, 2016 2:56 pm

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".


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests