Discussion:
[Scons-users] Scons script stopped working - error: The system cannot find the path specified.
Zarko Coklin
2016-05-10 20:07:55 UTC
Permalink
Hi all!


Long story short, I work on a project and it uses Scons to build the SW. On my PC I was using it for a long time. It worked just fine. Lately, some change has happened on my PC and now when I run Scons from Python and invoke os.system() it keeps failing. The error reported is somewhat cryptic: 'The system cannot find the path specified' error. Very annoying!


For example, if the Python file invokes:

os.system("scons --version")


The output in DOS is:

The system cannot find the path specified.
SCons by Steven Knight et al.:
script: v2.2.0.issue-2856:2676:d23b7a2f45e8[MODIFIED], 2012/08/05 15:38:28, by garyo on oberbrunner-dev
engine: v2.2.0.issue-2856:2676:d23b7a2f45e8[MODIFIED], 2012/08/05 15:38:28, by garyo on oberbrunner-dev
engine path: ['C:\\Python27\\Scripts\\..\\Lib\\site-packages\\scons-2.2.0\\SCons']
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation


I am using Pyton 2.7.3 and Scons version 2.2.0. Anybody has any idea what path is in question and how to debug the problem? Help is very much appreciated.


Regards,

Zarko
Bill Deegan
2016-05-10 20:33:23 UTC
Permalink
Zarko,

Do you have any custom SCons tools defined?
Can you try this as follows:

Create a SConstruct with only the following in it
---------------
DefaultEnvironment(tools=[])


Then fun your scons --version in the directory where that file is located.

-Bill


On Tue, May 10, 2016 at 1:07 PM, Zarko Coklin <***@hotmail.com> wrote:

> Hi all!
>
>
> Long story short, I work on a project and it uses Scons to build the SW.
> On my PC I was using it for a long time. It worked just fine. Lately, some
> change has happened on my PC and now when I run Scons from Python and
> invoke os.system() it keeps failing. The error reported is somewhat
> cryptic: 'The system cannot find the path specified' error. Very annoying!
>
>
> For example, if the Python file invokes:
>
> os.system("scons --version")
>
>
> The output in DOS is:
>
> The system cannot find the path specified.
> SCons by Steven Knight et al.:
> script: v2.2.0.issue-2856:2676:d23b7a2f45e8[MODIFIED], 2012/08/05
> 15:38:28, by garyo on oberbrunner-dev
> engine: v2.2.0.issue-2856:2676:d23b7a2f45e8[MODIFIED], 2012/08/05
> 15:38:28, by garyo on oberbrunner-dev
> engine path:
> ['C:\\Python27\\Scripts\\..\\Lib\\site-packages\\scons-2.2.0\\SCons']
> Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
> 2011, 2012 The SCons Foundation
>
> I am using Pyton 2.7.3 and Scons version 2.2.0. Anybody has any idea what
> path is in question and how to debug the problem? Help is very much
> appreciated.
>
>
> Regards,
>
> Zarko
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
Dirk Bächle
2016-05-10 20:37:11 UTC
Permalink
Hi Zarko,

this is just a wild guess, but it seems that your PATH variable has changed?

On 10.05.2016 22:07, Zarko Coklin wrote:
> Hi all!
>
>
> Long story short, I work on a project and it uses Scons to build the SW. On my PC I was using it for a long time. It worked just
> fine. Lately, some change has happened on my PC and now when I run Scons from Python and invoke os.system() it keeps failing. The
> error reported is somewhat cryptic: 'The system cannot find the path specified' error. Very annoying!
>
> For example, if the Python file invokes:
>
> os.system("scons --version")
>
> The output in DOS is:
>

What is the output of calling "scons" (should probably be "scons.bat") in a CMD window directly (not from within the Python
interpreter)?

Best regards,

Dirk
Žarko Coklin
2016-05-10 20:50:35 UTC
Permalink
Hm, I should correct myself a bit. I created a python script which goes like this:

from optparse import OptionParser
import os, sys
print ("Hello")
os.system("dir")


And the problem seems to be Python related cause the output goes like this:
C:\Code\Code_7.31>python zarko.py
Hello
The system cannot find the path specified.
Volume in drive C is OS
Volume Serial Number is 4C17-8448
Directory of C:\Code\Code_7.31
10/05/2016 04:39 PM <DIR> .
10/05/2016 04:39 PM <DIR> ..
18/02/2016 12:32 PM 2,097,952 $TEMP$.TMP
09/05/2016 12:48 PM 7,908 .cproject
17/07/2013 09:49 AM 787 .project
....

So the problem may be more Python than Scons related.

Zarko
Žarko Coklin
2016-05-18 15:38:21 UTC
Permalink
I was able to resolve my issue. Long story short: had to re-install Windows.


After that things started to work as expected. Wish I did not have to go to such drastic extent [☹] . All is good now. Thanks to all who responded.


Regards,

Zarko
Loading...