AWS Thinkbox Discussion Forums

Draft Error

Hi im getting this error

[code]=======================================================
Error Message

Exception during render: An error occurred in RenderTasks(): Error in CheckExitCode(): Renderer returned non-zero error code, 1. Check the log for more information.
à Deadline.Plugins.ScriptPlugin.RenderTasks(String taskId, Int32 startFrame, Int32 endFrame, String& outMessage)

=======================================================
Slave Log

0: Task timeout is 6000 seconds (Regular Task Timeout)
0: Loaded job: IA.010.0001.STmaps.v01.nk [DRAFT] (999_075_00a_16718abe)
0: Successfully mapped R: to \FX-NAS-01\vfx\RENDER
0: Successfully mapped K: to \FX-NAS-01\vfx\Projets
0: INFO: StartJob: initializing script plugin Draft
0: INFO: Found Draft python module at: ‘C:\Users\renderfx\AppData\Local\Thinkbox\Deadline\slave\Draft_node\Draft\Draft.pyd’
0: INFO: About: Draft Plugin for Deadline
0: Plugin rendering frame(s): 0
0: INFO: Draft job starting…
0: INFO: Stdout Handling Enabled: False
0: INFO: Popup Handling Enabled: False
0: INFO: Using Process Tree: True
0: INFO: Hiding DOS Window: True
0: INFO: Creating New Console: False
0: INFO: Looking for bundled python at: ‘C:\Program Files\Thinkbox\Deadline\python\2.6.7\x64\python.exe’
0: INFO: Render Executable: “C:\Program Files\Thinkbox\Deadline\python\2.6.7\x64\python.exe”
0: INFO: Render Argument: -u “C:/Users/renderfx/AppData/Local/Thinkbox/Deadline/slave/Draft_node/jobsData/simple_slate_h264_MJPEG_burnins.py” username=“ngirard” entity="" version=“lens map applied” width=5120 height=2700 frameList=1-300 startFrame=1 endFrame=300 inFile="\fx-nas-01\vfx\RENDER\IA\SHOTS\010\0001\cmp\outputs\v08\IA.010.01.DST.comp.v08.%v.####.exr" outFile="\fx-nas-01\vfx\RENDER\IA\SHOTS\010\0001\cmp\outputs\v08\Draft\IA.010.01.DST.comp.v08.%v…mov" deadlineJobID=999_075_999_7d3cd453
0: INFO: Startup Directory: “C:\Users\renderfx\AppData\Local\Thinkbox\Deadline\slave\Draft_node\Draft”
0: INFO: Process Priority: BelowNormal
0: INFO: Process is now running
0: STDOUT: Checking for license at 27001@prodflexmr
0: STDOUT: C:\Users\renderfx\AppData\Local\Thinkbox\Deadline\slave\Draft_node\Draft\DraftParamParser.py:34: DeprecationWarning: the sets module is deprecated
0: STDOUT: import sets
0: STDOUT: Draft Version: 1.0.0.46764
0: STDOUT: Command line args:
0: STDOUT: username=ngirard
0: STDOUT: entity=
0: STDOUT: version=lens map applied
0: STDOUT: width=5120
0: STDOUT: height=2700
0: STDOUT: frameList=1-300
0: STDOUT: startFrame=1
0: STDOUT: endFrame=300
0: STDOUT: inFile=\fx-nas-01\vfx\RENDER\IA\SHOTS\010\0001\cmp\outputs\v08\IA.010.01.DST.comp.v08.%v.####.exr
0: STDOUT: outFile=\fx-nas-01\vfx\RENDER\IA\SHOTS\010\0001\cmp\outputs\v08\Draft\IA.010.01.DST.comp.v08.%v…mov
0: STDOUT: deadlineJobID=999_075_999_7d3cd453
0: STDOUT: Encoding Slate Frames…
0: STDOUT: Processing Frame: 1…-1
0: STDOUT: Traceback (most recent call last):
0: STDOUT: File “C:/Users/renderfx/AppData/Local/Thinkbox/Deadline/slave/Draft_node/jobsData/simple_slate_h264_MJPEG_burnins.py”, line 197, in
0: STDOUT: bgFrame = Draft.Image.ReadFromFile( inFile )
0: STDOUT: RuntimeError: Error reading pixel data from image file “\fx-nas-01\vfx\RENDER\IA\SHOTS\010\0001\cmp\outputs\v08\IA.010.01.DST.comp.v08.l.0001.exr”. Tried to read scan line outside the image file’s data window.
0: STDOUT: Output #0, mov, to ‘\fx-nas-01\vfx\RENDER\IA\SHOTS\010\0001\cmp\outputs\v08\Draft\IA.010.01.DST.comp.v08.l…mov’:
0: STDOUT: Metadata:
0: STDOUT: encoder : Lavf53.24.0
0: STDOUT: Stream #0:0: Video: mjpeg (jpeg / 0x6765706A), yuvj420p, 1920x1080, q=2-31, 75000 kb/s, 24 tbn, 24 tbc
0: INFO: Process exit code: 1

=======================================================
Error Type

RenderPluginException

=======================================================
Error Stack Trace

à Deadline.Plugins.Plugin.RenderTask(String taskId, Int32 startFrame, Int32 endFrame)
à Deadline.Slaves.SlaveRenderThread.RenderCurrentTask(TaskLogWriter tlw)
[/code]

with this template:

[code]import sys
import os
import datetime
import copy
import xml.etree.ElementTree as xml

import Draft
from DraftParamParser import *

print “Draft Version: %s” % Draft.LibraryInfo.Version()

def ResizeWithLetterbox(self, width, height):
if width <= 0:
raise RuntimeError(‘width must be a positive number’)
if height <= 0:
raise RuntimeError(‘height must be a positive number’)
sourceAR = float(self.width) / self.height
destAR = float(width) / height
if sourceAR == destAR:
self.Resize(width, height)
else:
image = copy.deepcopy(self)
if width <= self.width and height <= self.height:
self.Crop(0, 0, width, height)
else:
self.Resize(width,height)
self.SetToColor(Draft.ColorRGBA(0, 0, 0, 1.0))
if sourceAR > destAR:
image.Resize(width,int(round(width/sourceAR)))
else:
image.Resize(int(round(height*sourceAR)),height)
self.CompositeWithPositionAndGravity(image, 0.5, 0.5, Draft.PositionalGravity.CenterGravity, Draft.CompositeOperator.CopyCompositeOp)

Draft.Image.ResizeWithLetterbox = ResizeWithLetterbox

#Returns a dictionary of a Deadline Job’s properties
def getDeadlineJob (job, repository):
deadlineJobPath = (repository + “\jobs\” + job + “\” + job + “.job”)
jobKeys = (xml.parse(deadlineJobPath)).getroot()
jobDict = {}
for o in list(jobKeys):
if len(o.getchildren()) < 1:
jobDict[o.tag] = o.text
else:
jobDict[o.tag] = []
for t in list(o):
(jobDict[o.tag]).append(t.text)
jobDict[‘deadlineJobPath’] = deadlineJobPath
return jobDict

#Returns a list of frames based on the given frameString
def FrameListToFrames( frameString ):
frames = []
frameRangeTokens = re.split( ‘\s+|,+’, frameString )

for token in frameRangeTokens:
    try:
        if ( len(token) > 0 ):
            dashIndex = string.find( token, '-', 1)

            if ( dashIndex == -1 ):
                startFrame = int(token)
                frames.add( startFrame )
            else:
                startFrame = int(token[0:dashIndex])

                m = re.match( "(-?\d+)(?:(x|step|by|every)(\d+))?", token[dashIndex + 1:] )
                if ( m == None ):
                    raise StandardError( "Second part of Token '" + token[dashIndex + 1:] + "' failed regex match" )
                else:
                    endFrame = int(m.group(1))

                    if ( m.group(2) == None ):
                        frames.extend( range(startFrame, endFrame + 1 ))
                    else:
                        dir = 1
                        if startFrame > endFrame:
                            dir = -1

                        byFrame = int(m.group(3));

                        frame = startFrame
                        while (startFrame * dir) <= (endFrame * dir):
                            frames.add( frame )
                            frame += byFrame * dir

    except:
        print "ERROR: Frame Range token '" + token + "' is malformed. Skipping this token."
        raise

frames = list(set(frames))
frames.sort()

return frames

#CHANGE ME! Path to the Deadline Repository root
deadlineRepo = “\fx-deadline\deadline\”

#CHANGE ME! Path to an image containing the background of the slate frame
slateFrame = “\\fx-deadline\deadline\Draft\Slate_Montage5K.png”

#The argument name/types we’re expecting from the command line arguments
expectedTypes = dict()
expectedTypes[‘frameList’] = ‘’
expectedTypes[‘inFile’] = ‘’
expectedTypes[‘outFile’] = ‘’
expectedTypes[‘username’] = ‘’
expectedTypes[‘entity’] = ‘’
expectedTypes[‘version’] = ‘’
expectedTypes[‘deadlineJobID’] = ‘’

#Parse the command line arguments
params = ParseCommandLine( expectedTypes, sys.argv )

inFilePattern = params[‘inFile’]
frames = FrameListToFrames( params[‘frameList’] )
(outBase, outExt)= os.path.splitext( params[‘outFile’] )

#not a huge deal if we can’t connect to the repo, we’ll just be missing some info
try:
jobParams = getDeadlineJob( params[‘deadlineJobID’], deadlineRepo )
except:
jobParams = {}

outWidth = 1920
outHeight = 1080
slateFrames = 1

for eye in [‘l’,‘r’]:
#Build up the encoders
outBaseEye = outBase.replace( ‘%v’, eye )
MJPEGencoder = Draft.VideoEncoder( outBaseEye + outExt, 24.0, outWidth, outHeight, 75000, “MJPEG” )

#Annotation info used for burn ins
annotationInfo = Draft.AnnotationInfo()
annotationInfo.FontType = "Times-New-Roman"
annotationInfo.PointSize = int( outHeight * 0.022 )
annotationInfo.Color = Draft.ColorRGBA( 1.0, 1.0, 1.0, 1.0 )

#prep the Slate Frame
try:
    slate = Draft.Image.ReadFromFile( slateFrame )
except:
    slate = Draft.Image.CreateImage( outWidth, outHeight )
    slate.SetToColor( Draft.ColorRGBA( 0.0, 0.0, 0.0, 1.0 ) )

if ( slate.width != outWidth or slate.height != outHeight ):
    slate.ResizeWithLetterbox( outWidth, outHeight )

#sets up the text on the slate frame
slateAnnotations = [
      ("SHOW", jobParams.get('ExtraInfo1', '<SKIP>')), #This line is skipped if there is not ExtraInfo1
      ("Episode", params.get('episode', '<SKIP>')), #This line is skipped if 'episode' isn't in the extra args
      ("Shot", params['entity']),
      ("Frames", params['frameList']),
      ("Handles", params.get('handles', '<SKIP>')), #This line is skipped if 'handles' isn't in the extra args
      ("Version", params['version']),
      ("",''),
      ("",''),
      ("Artist", params['username']),
      ("Date", datetime.datetime.now().strftime("%m/%d/%Y %I:%M %p") )
   ]

#comp the annotations over top the slate frame
skipLines = 0
for i in range( 0, len( slateAnnotations ) ):
    annotationTuple = slateAnnotations[i]

    if ( annotationTuple[1] == "<SKIP>" ):
        skipLines += 1
        continue

    lineNum = i - skipLines
    if ( annotationTuple[0] != "" ):
        annotation = Draft.Image.CreateAnnotation( slateAnnotations[i][0] + ": ", annotationInfo )
        slate.CompositeWithPositionAndGravity( annotation, 0.45, 0.7 - (lineNum * 0.06), Draft.PositionalGravity.SouthEastGravity, Draft.CompositeOperator.OverCompositeOp )

    if ( annotationTuple[1] != "" ):
        annotation = Draft.Image.CreateAnnotation( slateAnnotations[i][1], annotationInfo )
        slate.CompositeWithPositionAndGravity( annotation, 0.46, 0.7 - (lineNum * 0.06), Draft.PositionalGravity.SouthWestGravity, Draft.CompositeOperator.OverCompositeOp )

#encode the slate frames at the start of the video
print( "Encoding Slate Frames..." )
for i in range( 0, slateFrames ):
    MJPEGencoder.EncodeNextFrame( slate )

studioAnnotation = Draft.Image.CreateAnnotation( "The Ice Age", annotationInfo )
entityAnnotation = Draft.Image.CreateAnnotation( "%s    %s" % (params['entity'], datetime.datetime.now().strftime("%m/%d/%Y")), annotationInfo )
annotationInfo.BackgroundColor = Draft.ColorRGBA( 0.0, 0.0, 0.0, 1.0 )

#Main encoding loop
for frameNumber in frames:
    print( "Processing Frame: %d...-1" % frameNumber )

    inFile = inFilePattern.replace( '%v', eye )
    inFile = ReplaceFilenameHashesWithNumber( inFile, frameNumber )
    bgFrame = Draft.Image.ReadFromFile( inFile )

    if ( bgFrame.width != outWidth or bgFrame.height != outHeight ):
        bgFrame.ResizeWithLetterbox( outWidth, outHeight )

    #Do the frame burnins
    framesAnnotation = Draft.Image.CreateAnnotation( str( frameNumber ), annotationInfo )
    bgFrame.CompositeWithPositionAndGravity( studioAnnotation, 0.0, 1.0, Draft.PositionalGravity.NorthWestGravity, Draft.CompositeOperator.OverCompositeOp )
    bgFrame.CompositeWithPositionAndGravity( entityAnnotation, 0.0, 0.0, Draft.PositionalGravity.SouthWestGravity, Draft.CompositeOperator.OverCompositeOp )
    bgFrame.CompositeWithPositionAndGravity( framesAnnotation, 1.0, 0.0, Draft.PositionalGravity.SouthEastGravity, Draft.CompositeOperator.OverCompositeOp )

    MJPEGencoder.EncodeNextFrame( bgFrame )

#Finalize the encoding process
MJPEGencoder.FinalizeEncoding()

[/code]

And here’s a screenshot of the situation

So deadline is telling me that he is still rendering, my my node is telling me different

Do you have any input on what is going wrong ?

Regarding the error in your log file: I believe we found the problem, and we intend to fix it in a future release. My understanding is that EXRs keep track of two different rectangles: a display window (what is shown), and a data window (what is stored). Draft currently assumes that the display window and the data window are the same, which is incorrect in your file.

Regarding your screenshot: maybe the node needs to be refreshed? (Right-click the node in the slave list, and click “Refresh Slave”)

Privacy | Site terms | Cookie preferences