Hello,
I’m trying to add an output path to a selected job using a job script.
So far I’ve come up with the following script
from Deadline.Scripting import *
def __main__( *args ):
outFolder = "H:\Temp\Test"
outFile = "F????.tif"
outputDirectories = JobUtils.GetCurrentJobValue(0, "OutputDirectories" )
outputFilenames = JobUtils.GetCurrentJobValue(0, "OutputFileNames" )
outputDirectories.push(outFolder)
outputFilenames.push(outFile)
JobUtils.SetCurrentJobValue( 0, "OutputDirectories", outputDirectories)
JobUtils.SetCurrentJobValue( 0, "OutputFileNames", outputFilenames)
This gives me the error message:
“‘Array[object]’ object has no attribute ‘push’ (System.MissingMemberException)”
I’ve tried replacing
outputDirectories.push(outFolder)
outputFilenames.push(outFile)
with
if(len(outputDirectories) < 1):
outputDirectories = [outFolder]
if(len(outputFilenames) < 1):
outputFilenames = [outFile]
but then it gives me : “not all arguments converted during string formatting (IronPython.Runtime.Exceptions.ArgumentTypeException)”
Is there any other way to add a new Output to a certain job, after the job has been submitted?
Thanks
Wim Wouters
Creative Conspiracy
Hey Wim,
The following script would do the trick, but unfortunately there is a bug in SetCurrentJobValue when passing array (tuple) values. We’ve addressed this problem internally, and the fix will be included in the Deadline 4.1 release, which is scheduled for the beginning of August.
Sorry for the inconvenience.
from Deadline.Scripting import *
def __main__( *args ):
outFolder = "H:\Temp\Test"
outFile = "F????.tif"
outputDirectories = JobUtils.GetCurrentJobValue(0, "OutputDirectories" )
outputFilenames = JobUtils.GetCurrentJobValue(0, "OutputFileNames" )
newOutputDirectories = []
for directory in outputDirectories:
newOutputDirectories.append( directory )
newOutputDirectories.append( outFolder )
newOutputFilenames = []
for filename in outputFilenames:
newOutputFilenames.append( filename )
newOutputFilenames.append( outFolder )
JobUtils.SetCurrentJobValue( 0, "OutputDirectories", tuple(newOutputDirectories) )
JobUtils.SetCurrentJobValue( 0, "OutputFileNames", tuple(newOutputFilenames) )
Hi Ryan,
Thanks for your reply.
I’ve managed to solve this using an external console application which modifies the job xml file directly.
While implementing this solution I also encountered a bug in deadline:
When multiple Output Paths are set on a Job and you try to “Scan for Missing Output…”,
only the first output path is correct, the remaining output paths have the correct folder but the filename of the first output is appended.
for example:
A fusion comp with 2 savers generates the following content inside it’s job file:
H:\Temp\Test\v001
H:\Temp\Test\v002
test_v001_????.tif
test_v002_????.tif
When browsing the Outputs using Deadline Monitor everything is ok.
When scanning for missing output I get this result:
Completed Tasks
Task0
OK: H:\Temp\Test\v001\test_v001_0000.tif
OK: H:\Temp\Test\v001\test_v001_0001.tif
OK: H:\Temp\Test\v001\test_v001_0002.tif
OK: H:\Temp\Test\v001\test_v001_0003.tif
OK: H:\Temp\Test\v001\test_v001_0004.tif
Missing: H:\Temp\Test\v001\test_v001_0000.tif
Missing: H:\Temp\Test\v001\test_v001_0001.tif
Missing: H:\Temp\Test\v001\test_v001_0002.tif
Missing: H:\Temp\Test\v001\test_v001_0003.tif
Missing: H:\Temp\Test\v001\test_v001_0004.tif
Kind Regrads,
Wim Wouters
Cool, glad you found a workaround for now.
With regards to the Scan Missing Output bug, which version of Deadline are you using? From checking the release notes, this bug should be fixed in Deadline 4.0 and later. I’ve also confirmed that this isn’t a problem in the beta version of 4.1.
Cheers,