Announcement

Collapse
No announcement yet.

name 'reduce' is not defined

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • name 'reduce' is not defined

    Hello,

    We have the following error using vray 5 update 1.1 and Maya 2022
    Code:
    name 'reduce' is not defined
    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

    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\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,





  • #2
    Do send a scene (best if it is as simplified as possible) via the contact form so we can take a look. Mention me and include a link to this thread.
    Aleksandar Hadzhiev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      Thank you for the provided scene. I've managed to reproduce the error on a fresh scene; I'll ask the developers what exactly is going on and write back.
      EDIT: The issue is fixed in the latest internal nightly builds. I have informed the developers to pick the fix in the next stable build.
      Last edited by hermit.crab; 31-08-2021, 07:44 AM.
      Aleksandar Hadzhiev | chaos.com
      Chaos Support Representative | contact us

      Comment


      • #4
        ok thanks !

        Comment


        • #5
          Hi chaos support!
          Any news on this? I have the same error and at the moment the fix is to re-create the renderlayers from scratch.

          Cheers

          Comment


          • #6
            Further infos:
            Happend after I added another Render element (cryptomatte) and renamed it. I did that while being in a render layer. So maya did not let me change to another layer anymore. maya added an AOV collection in the render layer, which is broken. So, after disabling that collection, I was able to change to another layer again. But deleting that collection is not working. Just disabling a collection (with broken conections in it) is a dirt solution. (Not sure if this a vray or a maya bug, though)

            Comment


            • #7
              Tried this with the latest stable build and it does not seem to happen. Could you try?
              Aleksandar Hadzhiev | chaos.com
              Chaos Support Representative | contact us

              Comment

              Working...
              X