From: Greg Ercolano <erco@(email surpressed)> Subject: [Q+A] Python submit script not running Nuke on windows, perl script works fine Date: Fri, 10 Jul 2015 14:05:52 -0400 |
Msg# 2396 View Complete Thread (2 articles) | All Threads Last Next |
> We're using the new python scripts and they work OK, but not with Nuke. > When it executes nuke, it fails. It wasn't saying why, so we added some > diagnostics and found it was complaining that it couldn't find the executable, > but the executable is in the PATH correctly: > > Executing: nuke8.0 -x //SKYNET/projects_2012/pipeline/2d/nuke/oflares_8.nk 4,4 > > --- RETRY #2 of 3 > > Executing: nuke8.0 -x //SKYNET/projects_2012/pipeline/2d/nuke/oflares_8.nk 4,4 > ..this repeats.. > > In our submit_nuke.py script we define the NUKECMD and PATH this way: > > os.environ["NUKECMD"] = "nuke8.0 > os.environ["PATH"] = ( "c:/Program Files/Nuke8.0v3;" > + os.environ["PATH"] > ) > > The equivalent settings work fine in the perl version of the nuke submit script. > What is wrong here? After some investigation, the issue is Python's subprocess.call() which seems to be mistaking the ".0" in the "nuke8.0" command as a filename extension, preventing it from automatically trying to add the ".exe" extension. Normally, Windows does this automatically. But for some reason, the python subprocess.call() is confused by this. SOLUTION: The simple solution was to change this line in the submit script: BEFORE: os.environ["NUKECMD"] = "nuke8.0 AFTER: os.environ["NUKECMD"] = "nuke8.0.exe" # <-- SPECIFY THE ".exe" This solved the issue. Not sure if this is a bug or a feature in subprocess.call(), but including the ".exe" definitely solved it. You don't run into this if the command is just "nuke", in other words, if the command doesn't contain dots. |
From: Greg Ercolano <erco@(email surpressed)> Subject: Re: [Q+A] Python submit script not running Nuke on windows, perl script works fine Date: Fri, 10 Jul 2015 14:29:09 -0400 |
Msg# 2397 View Complete Thread (2 articles) | All Threads Last Next |
|