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