Hello,
We have the following error using vray 5 update 1.1 and Maya 2022
It happen when using Render Layers on some of our scenes.
At some point we are not able to switch anymore beetween render layer and the "reduce" error happen.
It happen also in batch render using deadline wich make the render crash.
Log bellow
I found a workaround by adding to the two scripts bellow the following code :
C:\Program Files\Autodesk\Maya2022\vray\scripts\vray\renderer Callbacks.py
C:\Program Files\Autodesk\Maya2022\Python37\Lib\site-packages\maya\app\renderSetup\model\renderSetupPri vate.py
I have the feeling it started to happen when we first add Render Element to some of our scene.
I should be able to provide a scene if needed.
Juste wanted to share.
Best,
We have the following error using vray 5 update 1.1 and Maya 2022
Code:
name 'reduce' is not defined
At some point we are not able to switch anymore beetween render layer and the "reduce" error happen.
It happen also in batch render using deadline wich make the render crash.
Log bellow
Code:
2021-08-24 19:47:13: 0: STDOUT: Error: file: C:/Users/administrateur/AppData/Local/Temp/tmp6CEC.tmp line 45: Render setup failure before unloading file reference 'B:/prod_2106/assets/perso/abc/perso_00.abc' 2021-08-24 19:47:13: 0: WARNING: Strict error checking on, ignoring the following unrecognized error or warning. If it is fatal, please email support@thinkboxsoftware.com with the error message. 2021-08-24 19:47:13: 0: STDOUT: Error: file: C:/Users/administrateur/AppData/Local/Temp/tmp6CEC.tmp line 45: RuntimeError: (kFailure): Unexpected Internal Failure 2021-08-24 19:47:13: 0: WARNING: Strict error checking on, ignoring the following unrecognized error or warning. If it is fatal, please email support@thinkboxsoftware.com with the error message. 2021-08-24 19:47:13: 0: STDOUT: Error: file: C:/Users/administrateur/AppData/Local/Temp/tmp6CEC.tmp line 45: NameError: file C:\Program Files\Autodesk\Maya2022\vray\scripts\vray\renderer Callbacks.py line 31: name 'reduce' is not defined 2021-08-24 19:47:13: 0: WARNING: Strict error checking on, ignoring the following unrecognized error or warning. If it is fatal, please email support@thinkboxsoftware.com with the error message. 2021-08-24 19:47:13: 0: STDOUT: Error: file: C:/Users/administrateur/AppData/Local/Temp/tmp6CEC.tmp line 45: NameError: file C:\Program Files\Autodesk\Maya2022\vray\scripts\vray\renderer Callbacks.py line 31: name 'reduce' is not defined 2021-08-24 19:47:13: 0: WARNING: Strict error checking on, ignoring the following unrecognized error or warning. If it is fatal, please email support@thinkboxsoftware.com with the error message. 2021-08-24 19:47:13: 0: STDOUT: Error: file: C:/Program Files/Autodesk/Maya2022/scripts/others/mayaBatchRenderProcedure.mel line 458: RuntimeError: file <string> line 2: Unapply layer layer_BG failed: name 'reduce' is not defined 2021-08-24 19:47:13: 0: WARNING: Strict error checking on, ignoring the following unrecognized error or warning. If it is fatal, please email support@thinkboxsoftware.com with the error message. 2021-08-24 19:47:13: 0: STDOUT: NameError: name 'reduce' is not defined 2021-08-24 19:47:13: 0: WARNING: Error: file: C:/Users/administrateur/AppData/Local/Temp/tmp6CEC.tmp line 56: Render failed. 2021-08-24 19:47:13: 0: WARNING: Encountered an error, logging render script contents for debugging: 2021-08-24 19:47:13: 0: WARNING: ################################ SCRIPT LOG START ################################ 2021-08-24 19:47:13: 0: WARNING: // Starting Mel program 2021-08-24 19:47:13: 0: proc renderIt(string $name) { 2021-08-24 19:47:13: 0: string $opt=""; string $rl=""; string $rp=""; float $resize=-1.; vrayRegisterRenderer(); vrayCreateVRaySettingsNode(); select vraySettings; 2021-08-24 19:47:13: 0: removeRenderLayerAdjustmentAndUnlock defaultRenderGlobals.animation; setAttr defaultRenderGlobals.animation 1; removeRenderLayerAdjustmentAndUnlock defaultRenderGlobals.startFrame; setAttr defaultRenderGlobals.startFrame 104; 2021-08-24 19:47:13: 0: removeRenderLayerAdjustmentAndUnlock defaultRenderGlobals.animation; setAttr defaultRenderGlobals.animation 1; removeRenderLayerAdjustmentAndUnlock defaultRenderGlobals.endFrame; setAttr defaultRenderGlobals.endFrame 104; 2021-08-24 19:47:13: 0: setAttr "defaultRenderGlobals.byFrameStep" 1; setAttr "defaultRenderGlobals.animation" true;; setAttr "vraySettings.frameStep" 1; setAttr "vraySettings.animation" true; 2021-08-24 19:47:13: 0: setAttr -type "string" "vraySettings.fileNamePrefix" "<Layer>/<Scene>/<Scene>"; 2021-08-24 19:47:13: 0: workspace -fr "images" "P:/prod_2106/shots/asset/render_out"; workspace -fr "depth" "P:/prod_2106/shots/asset/render_out"; 2021-08-24 19:47:13: 0: setAttr "vraySettings.width" 1920; 2021-08-24 19:47:13: 0: setAttr "vraySettings.height" 1080; 2021-08-24 19:47:13: 0: setAttr "vraySettings.sys_max_threads" 0; 2021-08-24 19:47:13: 0: setAttr "vraySettings.sys_progress_increment" 1; 2021-08-24 19:47:13: 0: $rl="rs_layer_char"; 2021-08-24 19:47:13: 0: if( `attributeExists "animType" vraySettings` ) 2021-08-24 19:47:13: 0: { 2021-08-24 19:47:13: 0: setAttr "vraySettings.animType" 1; 2021-08-24 19:47:13: 0: } 2021-08-24 19:47:13: 0: setMayaSoftwareLayers($rl, $rp); setImageSizePercent($resize); mayaBatchRenderProcedure(0, "", "", "vray", $opt); 2021-08-24 19:47:13: 0: } 2021-08-24 19:47:13: 0: // 2021-08-24 19:47:13: 0: // Main part 2021-08-24 19:47:13: 0: // 2021-08-24 19:47:13: 0: proc mainDeadlineRender() { 2021-08-24 19:47:13: 0: string $sceneName = "B:/prod_2106/shots/asset/lighting/asset_lighting.005.mb"; 2021-08-24 19:47:13: 0: print ("Loading scene: " + $sceneName + "\n"); 2021-08-24 19:47:13: 0: catch( python( "DeadlineMayaBatchFunctions.ForceLoadPlugins() " ) ); 2021-08-24 19:47:13: 0: int $loadFailed = catch( `file -o $sceneName` ); 2021-08-24 19:47:13: 0: if (!$loadFailed) { 2021-08-24 19:47:13: 0: catch( python( "DeadlineMayaBatchFunctions.OutputPluginVersions() " ) ); 2021-08-24 19:47:13: 0: } 2021-08-24 19:47:13: 0: catch( remapNodeFilePathsWithTokens( "file", "fileTextureName", true ) ); 2021-08-24 19:47:13: 0: catch( remapNodeFilePathsWithTokens( "aiStandIn", "dso", false ) ); 2021-08-24 19:47:13: 0: catch( mapOpenColorIOFile( 1 ) ); 2021-08-24 19:47:13: 0: string $checkScene = `file -q -sn`; 2021-08-24 19:47:13: 0: if ($checkScene=="") { 2021-08-24 19:47:13: 0: error ("Cannot load scene \"" + $sceneName + "\". Please check the scene path, then try opening the scene on the machine which ran this job to troubleshoot the problem.\n"); 2021-08-24 19:47:13: 0: } else if (catch(`renderIt($sceneName)`)) { 2021-08-24 19:47:13: 0: error ("Render failed.\n"); 2021-08-24 19:47:13: 0: } else { 2021-08-24 19:47:13: 0: print ("Render completed.\n"); 2021-08-24 19:47:13: 0: } 2021-08-24 19:47:13: 0: } 2021-08-24 19:47:13: 0: mainDeadlineRender(); 2021-08-24 19:47:13: 0: // Ending Mel program 2021-08-24 19:47:13: 0: WARNING: ################################# SCRIPT LOG END ################################# 2021-08-24 19:47:14: 0: Done executing plugin command of type 'Render Task'
I found a workaround by adding to the two scripts bellow the following code :
Code:
from functools import reduce
C:\Program Files\Autodesk\Maya2022\Python37\Lib\site-packages\maya\app\renderSetup\model\renderSetupPri vate.py
I have the feeling it started to happen when we first add Render Element to some of our scene.
I should be able to provide a scene if needed.
Juste wanted to share.
Best,
Comment