AWS Thinkbox Discussion Forums

Maxscript script job fails

Hi,

Im a new deadline user and are facing some problem sending a script job to Deadline.
For some reason it fails when executing it over deadline.

Process

  1. The maxfile that should be processed are open,
    I use the 3dsmax deadline submitter and head over to scripts tab, I have Submit script job, workstation mode, single task checked and popup handling unchecked
  2. press submit
  3. It opens the file on the workstation (workstation has 3dsmax UI license so it can run in ui mode)
  4. I get error message
    Error: FailRenderException : RenderTask: Unexpected exception (Maxscript exception:-- Unable to convert: 78039604L to type: String

I dont understand why it fails, the script works fine when I open and execute 3dsmax manually.
Script is around 2000 lines of code so its really hard to investigate why it crashes in deadline.
Are there any way to see which line it crashes on? Because as I said the script works fine in manual mode.

Isnt it possible to override this and force 3dsmax to open, execute script?

In this case the script is for baking objects.

Hello @VictorT

The first guess is the version of Max in which this script was created is different than the version installed on the machine in question?

The workstation mode should open Max and run the script in UI.

Just to be sure have you run the script within max on the same render node and does it work fine?

Its the same version on both machines, which in this case is 2023.
Script was also created in 2023.
I have tried the script locally on this machine and it works perfectly.

I attached the log in case that might be interesting.

2024/05/28 09:39:32 INF: [00836] [38172] Done loading file:  C:/ProgramData/Thinkbox/Deadline10/workers/jobsData/66558942f98806617cf7c537/Filetobeprocessed.max 
2024/05/28 09:39:32 INF: [00836] [38172] SYSTEM: Production renderer is changed to V-Ray 5, update 2.3. Previous messages are cleared.
2024/05/28 09:39:36 INF: [00836] [38172] [V-Ray] ============================================================
2024/05/28 09:39:36 INF: [00836] [38172] [V-Ray] Console created, V-Ray 5.20.24 for x64 from Oct 21 2022, 01:11:38
2024/05/28 09:39:36 INF: [00836] [38172] [V-Ray] ============================================================
2024/05/28 09:39:36 INF: [00836] [38172] [V-Ray] Compiled with Microsoft Visual C++ compiler, version 19,24
2024/05/28 09:39:36 INF: [00836] [38172] [V-Ray] Host is 3ds Max, version 25
2024/05/28 09:39:36 INF: [00836] [38172] [V-Ray] V-Ray DLL version is 5.20.24
2024/05/28 09:41:06 INF: [00836] [38172] Include script: B:\3D.Plugins.Scripts\NetworkBaking.ms
2024/05/28 09:41:08 INF: [00836] [38172] CORONA: Corona is up and running. Corona version: 8 (Hotfix 2), netrender mode: off, slave mode: off, quiet mode: on, Max gamma (display/input/output): 2,2/2,2/1
)
   at Deadline.Plugins.DeadlinePlugin.FailRender(String message) (Python.Runtime.PythonException)
  File "C:\ProgramData\Thinkbox\Deadline10\workers\plugins\66558942f98806617cf7c537\3dsmax.py", line 405, in RenderTasks
    self.MyMaxController.RenderTasks()
  File "C:\ProgramData\Thinkbox\Deadline10\workers\plugins\66558942f98806617cf7c537\3dsmax.py", line 1627, in RenderTasks
    self.RenderFrame(frame)
  File "C:\ProgramData\Thinkbox\Deadline10\workers\plugins\66558942f98806617cf7c537\3dsmax.py", line 2496, in RenderFrame
    self.ExecuteMaxScriptFile(self.MaxScriptJobScript, frameNumber=self.CurrentFrame)
  File "C:\ProgramData\Thinkbox\Deadline10\workers\plugins\66558942f98806617cf7c537\3dsmax.py", line 2894, in ExecuteMaxScriptFile
    returnedMessage = self.PollUntilComplete(useTimeout, timeout)
  File "C:\ProgramData\Thinkbox\Deadline10\workers\plugins\66558942f98806617cf7c537\3dsmax.py", line 3000, in PollUntilComplete
    self.Plugin.FailRender("RenderTask: Unexpected exception (%s)" % e.Message)
   at Python.Runtime.Dispatcher.Dispatch(ArrayList args)
   at __FranticX_GenericDelegate0Dispatcher.Invoke()
   at Deadline.Plugins.DeadlinePlugin.RenderTasks()
   at Deadline.Plugins.DeadlinePlugin.DoRenderTasks()
   at Deadline.Plugins.PluginWrapper.RenderTasks(Task task, String& outMessage, AbortLevel& abortLevel)
   at Deadline.Plugins.PluginWrapper.RenderTasks(Task task, String& outMessage, AbortLevel& abortLevel)

=======================================================

Type
=======================================================
RenderPluginException

=======================================================
Stack Trace
=======================================================
   at Deadline.Plugins.SandboxedPlugin.d(DeadlineMessage bgj, CancellationToken bgk)
   at Deadline.Plugins.SandboxedPlugin.RenderTask(Task task, CancellationToken cancellationToken)
   at Deadline.Slaves.SlaveRenderThread.c(TaskLogWriter ajq, CancellationToken ajr)

=======================================================
Log
=======================================================
2024-05-28 09:38:33:  0: Loading Job's Plugin timeout is Disabled
2024-05-28 09:38:33:  0: SandboxedPlugin: Render Job As User disabled, running as current user 'victor'
2024-05-28 09:38:35:  0: Executing plugin command of type 'Initialize Plugin'
2024-05-28 09:38:35:  0: INFO: Executing plugin script 'C:\ProgramData\Thinkbox\Deadline10\workers\plugins\66558942f98806617cf7c537\3dsmax.py'
2024-05-28 09:38:35:  0: INFO: Plugin execution sandbox using Python version 3
2024-05-28 09:38:35:  0: INFO: 3dsmax Plugin Initializing...
2024-05-28 09:38:35:  0: INFO: Worker Running as Service: False
2024-05-28 09:38:35:  0: INFO: About: 3dsmax Plugin for Deadline
2024-05-28 09:38:35:  0: INFO: The job's environment will be merged with the current environment before rendering
2024-05-28 09:38:35:  0: Done executing plugin command of type 'Initialize Plugin'
2024-05-28 09:38:35:  0: Start Job timeout is disabled.
2024-05-28 09:38:35:  0: Task timeout is disabled.
2024-05-28 09:38:35:  0: Loaded job: Bake_Furn [MAXSCRIPT] (66558942f98806617cf7c537)
2024-05-28 09:38:35:  0: Executing plugin command of type 'Start Job'
2024-05-28 09:38:35:  0: DEBUG: S3BackedCache Client is not installed.
2024-05-28 09:38:35:  0: INFO: Executing global asset transfer preload script 'C:\ProgramData\Thinkbox\Deadline10\workers\plugins\66558942f98806617cf7c537\GlobalAssetTransferPreLoad.py'
2024-05-28 09:38:35:  0: INFO: Looking for legacy (pre-10.0.26) AWS Portal File Transfer...
2024-05-28 09:38:35:  0: INFO: Looking for legacy (pre-10.0.26) File Transfer controller in C:/Program Files/Thinkbox/S3BackedCache/bin/task.py...
2024-05-28 09:38:35:  0: INFO: Could not find legacy (pre-10.0.26) AWS Portal File Transfer.
2024-05-28 09:38:35:  0: INFO: Legacy (pre-10.0.26) AWS Portal File Transfer is not installed on the system.
2024-05-28 09:38:35:  0: INFO: Start Job called - starting up 3dsmax plugin
2024-05-28 09:38:35:  0: INFO: Rendering with 3ds Max Version: 2023
2024-05-28 09:38:35:  0: INFO: Not forcing a build of 3ds Max because version 2014 and later is 64 bit only
2024-05-28 09:38:35:  0: INFO: Rendering with executable: C:\Program Files\Autodesk\3ds Max 2023\3dsmax.exe
2024-05-28 09:38:35:  0: INFO: Worker 3ds Max Version: 25.2.2.3312
2024-05-28 09:38:35:  0: INFO: Submitted from 3ds Max Version: 25.2.2.3312
2024-05-28 09:38:35:  0: INFO: Submitted using Renderer Name: V_Ray_5__update_2_3:V_Ray_5__update_2_3
2024-05-28 09:38:35:  0: INFO: Submitted using Renderer Class Id: #(1941615238L, 2012806412L)
2024-05-28 09:38:35:  0: INFO: Checking registry for 3ds Max language code
2024-05-28 09:38:35:  0: INFO: Language code string: ENU
2024-05-28 09:38:35:  0: INFO: Language sub directory: en-US
2024-05-28 09:38:35:  0: INFO: Fail on existing 3dsmax process: 0
2024-05-28 09:38:35:  0: INFO: Run render sanity check timeout: 60 seconds
2024-05-28 09:38:35:  0: INFO: Load 3dsmax timeout: 1000 seconds
2024-05-28 09:38:35:  0: INFO: Start 3dsmax job timeout: 1000 seconds
2024-05-28 09:38:35:  0: INFO: Execute customize.ms script timeout: 1000 seconds
2024-05-28 09:38:35:  0: INFO: Progress update timeout: 8000 seconds
2024-05-28 09:38:35:  0: INFO: Progress update timeout disabled: False
2024-05-28 09:38:35:  0: INFO: Worker mode enabled: False
2024-05-28 09:38:35:  0: INFO: Silent mode enabled: True
2024-05-28 09:38:35:  0: INFO: Secure mode enabled: False
2024-05-28 09:38:35:  0: INFO: Local rendering enabled: True
2024-05-28 09:38:35:  0: INFO: 3dsmax start up file: C:\ProgramData\Thinkbox\Deadline10\workers\jobsData\66558942f98806617cf7c537\maxStartup\0\deadlineStartupMax2023.max
2024-05-28 09:38:35:  0: INFO: Using user profiles: 1
2024-05-28 09:38:35:  0: INFO: 3dsmax user profile path: C:\Users\victor\AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU
2024-05-28 09:38:35:  0: INFO: 3dsmax plugcfg directory: C:\Users\victor\AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU\en-US\plugcfg
2024-05-28 09:38:35:  0: INFO: 3dsmax network directory: C:\Users\victor\AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU\Network
2024-05-28 09:38:35:  0: INFO: 3dsmax usermacros directory: C:\Users\victor\AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU\usermacros
2024-05-28 09:38:36:  0: INFO: Scripts Startup Directory: C:\Users\victor\AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU\scripts\startup
2024-05-28 09:38:36:  0: INFO: Kill ADSK WSCommCntr*.exe process: False
2024-05-28 09:38:36:  0: INFO: Workspace Directory: C:\Users\victor\AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU\en-US\UI\Workspaces
2024-05-28 09:38:36:  0: INFO: Workspace ini file: C:\Users\victor\AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU\en-US\UI\Workspaces\Workspace1.se.ini [Scene Explorer] set to [Visible=False]
2024-05-28 09:38:36:  0: INFO: 3dsmax data path: C:\Users\victor\AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU
2024-05-28 09:38:36:  0: INFO: 3dsmax ini file: C:\Users\victor\AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU\3dsmax.ini
2024-05-28 09:38:36:  0: INFO: Network log file: C:\Users\victor\AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU\Network\Max.log
2024-05-28 09:38:36:  0: INFO: Creating output directories if necessary...
2024-05-28 09:38:36:  0: INFO: Plugin ini file: C:\Program Files\Autodesk\3ds Max 2023\en-US\plugin.ini
2024-05-28 09:38:36:  0: INFO: Including user profile plugin ini: C:\Users\victor\AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU\Plugin.UserSettings.ini
2024-05-28 09:38:36:  0: INFO: Lightning connection plugin: C:\ProgramData\Thinkbox\Deadline10\workers\jobsData\66558942f98806617cf7c537\maxStartup\0\lightning64Max2023.dlx
2024-05-28 09:38:36:  0: INFO: Temp folder: C:\ProgramData\Thinkbox\Deadline10\workers\jobsData\66558942f98806617cf7c537\0_tempD0lp20
2024-05-28 09:38:36:  0: INFO: 3dsmax socket connection port: 64137
2024-05-28 09:38:36:  0: INFO: Setting up startup environment
2024-05-28 09:38:36:  0: INFO: Setting Process Environment Variable DEADLINE_MAX_PORT to 64137
2024-05-28 09:38:36:  0: INFO: Setting Process Environment Variable DEADLINE_MAX_TOKEN to 347160203736
2024-05-28 09:38:36:  0: INFO: Setting NW_ROOT_PATH to 'C:\ProgramData\Thinkbox\Deadline10\workers\jobsData\66558942f98806617cf7c537\0_tempD0lp20' for this session
2024-05-28 09:38:36:  0: INFO: Setting Process Environment Variable NW_ROOT_PATH to C:\ProgramData\Thinkbox\Deadline10\workers\jobsData\66558942f98806617cf7c537\0_tempD0lp20
2024-05-28 09:38:36:  0: INFO: Setting DEADLINE_JOB_TEMP_FOLDER to 'C:\ProgramData\Thinkbox\Deadline10\workers\jobsData\66558942f98806617cf7c537\0_tempD0lp20' for this session
2024-05-28 09:38:36:  0: INFO: Setting Process Environment Variable DEADLINE_JOB_TEMP_FOLDER to C:\ProgramData\Thinkbox\Deadline10\workers\jobsData\66558942f98806617cf7c537\0_tempD0lp20
2024-05-28 09:38:36:  0: INFO: Copying C:\ProgramData\Thinkbox\Deadline10\workers\jobsData\66558942f98806617cf7c537\maxStartup\0\lightning64Max2023.dlx to C:\ProgramData\Thinkbox\Deadline10\workers\jobsData\66558942f98806617cf7c537\0_tempD0lp20\lightning\lightning.dlx
2024-05-28 09:38:36:  0: INFO: Created temporary plugin ini file: C:\Users\victor\AppData\Local\Temp\dl_347160203736.ini
2024-05-28 09:38:36:  0: INFO: Temporary plugin ini contains:
2024-05-28 09:38:36:  0: [Include]
2024-05-28 09:38:36:  0: Original=C:\Program Files\Autodesk\3ds Max 2023\en-US\plugin.ini
2024-05-28 09:38:36:  0: UserProfile=C:\Users\victor\AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU\Plugin.UserSettings.ini
2024-05-28 09:38:36:  0: Deadline Lightning=C:\Users\victor\AppData\Local\Temp\lightningplugin_347160203736.ini
2024-05-28 09:38:36:  0: INFO: Setting Process Environment Variable ABORT_ON_ARNOLD_LICENSE_FAIL to Always Fail
2024-05-28 09:38:36:  0: INFO: Starting monitored managed process 3dsmaxProcess
2024-05-28 09:38:36:  0: INFO: Stdout Redirection Enabled: True
2024-05-28 09:38:36:  0: INFO: Stdout Handling Enabled: True
2024-05-28 09:38:36:  0: INFO: Popup Handling Enabled: False
2024-05-28 09:38:36:  0: INFO: Using Process Tree: True
2024-05-28 09:38:36:  0: INFO: Hiding DOS Window: True
2024-05-28 09:38:36:  0: INFO: Creating New Console: False
2024-05-28 09:38:36:  0: INFO: Running as user: victor
2024-05-28 09:38:36:  0: INFO: Executable: "C:\Program Files\Autodesk\3ds Max 2023\3dsmax.exe"
2024-05-28 09:38:36:  0: INFO: Argument:  -p "C:\Users\victor\AppData\Local\Temp\dl_347160203736.ini" -q -silent "C:\ProgramData\Thinkbox\Deadline10\workers\jobsData\66558942f98806617cf7c537\maxStartup\0\deadlineStartupMax2023.max"
2024-05-28 09:38:36:  0: INFO: Full Command: "C:\Program Files\Autodesk\3ds Max 2023\3dsmax.exe"  -p "C:\Users\victor\AppData\Local\Temp\dl_347160203736.ini" -q -silent "C:\ProgramData\Thinkbox\Deadline10\workers\jobsData\66558942f98806617cf7c537\maxStartup\0\deadlineStartupMax2023.max"
2024-05-28 09:38:36:  0: INFO: Startup Directory: "C:\Program Files\Autodesk\3ds Max 2023"
2024-05-28 09:38:36:  0: INFO: Process Priority: BelowNormal
2024-05-28 09:38:36:  0: INFO: Process Affinity: default
2024-05-28 09:38:36:  0: INFO: Process is now running
2024-05-28 09:38:36:  0: INFO: Waiting for connection from 3dsmax
2024-05-28 09:39:23:  0: INFO: Connected to 3dsmax plugin: Lightning Jun 28 2022 21:43:25 R
2024-05-28 09:39:23:  0: INFO: Scene file to render: "C:\ProgramData\Thinkbox\Deadline10\workers\jobsData\66558942f98806617cf7c537\Filetobeprocessed.max"
2024-05-28 09:39:23:  0: INFO: Camera: no camera specified, rendering active viewport
2024-05-28 09:39:23:  0: INFO: This is a MAXScript Job
2024-05-28 09:39:23:  0: INFO: MAXScript to be executed: "C:\ProgramData\Thinkbox\Deadline10\workers\jobsData\66558942f98806617cf7c537\Batch_BTT.ms"
2024-05-28 09:39:23:  0: INFO: Restarting renderer after each frame: 1
2024-05-28 09:39:23:  0: INFO: Showing frame buffer: 0
2024-05-28 09:39:23:  0: INFO: Overriding save file option: False
2024-05-28 09:39:23:  0: INFO: Frame number base: 0
2024-05-28 09:39:23:  0: INFO: Remove padding from output filename: 0
2024-05-28 09:39:23:  0: INFO: Enable gamma correction: 0
2024-05-28 09:39:23:  0: INFO: Ignore missing external file errors: 1
2024-05-28 09:39:23:  0: INFO: Ignore missing UVW errors: 1
2024-05-28 09:39:23:  0: INFO: Ignore missing XREF errors: 1
2024-05-28 09:39:23:  0: INFO: Ignore missing DLL errors: 0
2024-05-28 09:39:23:  0: INFO: Disabling Multipass: 0
2024-05-28 09:39:23:  0: INFO: Loading 3dsmax scene file
2024-05-28 09:39:26:  0: STDOUT: - 09:39:25.594 INFO: Begin resolve assembly 'Autodesk.Max.StateSets, Version=25.2.2.3312, Culture=neutral, PublicKeyToken=null- 09:39:25.594 INFO: Resolved assembly
2024-05-28 09:39:36:  0: INFO: Scene loaded successfully
2024-05-28 09:39:36:  0: INFO: Executing script: C:\ProgramData\Thinkbox\Deadline10\workers\plugins\66558942f98806617cf7c537\customize.ms
2024-05-28 09:39:36:  0: INFO: >Version Information:
2024-05-28 09:39:36:  0: INFO:   >OS version: Microsoft Windows NT 6.2.9200.0
2024-05-28 09:39:36:  0: INFO:   >3ds MAX, API, SDK version: #(25000, 62, 0, 25, 2, 2, 3312, 2023, ".2.2 Update")
2024-05-28 09:39:36:  0: INFO:   >3ds Max Version: 25.2.2.3312
2024-05-28 09:39:36:  0: INFO:   >Assigned renderer: V_Ray_5__update_2_3:V_Ray_5__update_2_3
2024-05-28 09:39:36:  0: INFO: >Applying customizations to max file...
2024-05-28 09:39:36:  0: INFO: >Adding scene path 'C:\ProgramData\Thinkbox\Deadline10\workers\jobsData\66558942f98806617cf7c537' to session paths
2024-05-28 09:39:36:  0: INFO:   +Restored Scene Selection: #()
2024-05-28 09:39:36:  0: INFO: >General Renderer Settings:
2024-05-28 09:39:36:  0: INFO: >Bitmap Pager Settings:
2024-05-28 09:39:36:  0: INFO:   +Not overriding Bitmap Pager setting
2024-05-28 09:39:36:  0: INFO: >Render Environment Settings:
2024-05-28 09:39:37:  0: INFO: >V-Ray detected as current renderer.
2024-05-28 09:39:37:  0: INFO: >V-Ray version, build: #("5.20.24", "31687", "40e850c5")
2024-05-28 09:39:37:  0: INFO: >Enabled V-Ray silent mode
2024-05-28 09:39:44:  0: INFO:   +output_imageaspect (Image_aspect) set to 1.33333
2024-05-28 09:39:46:  0: INFO:   +lightcache_preset_retraceThreshold set to #(2.0, 8.0)
2024-05-28 09:39:46:  0: INFO:   +lightcache_preset_subdivs set to #(1000, 3000)
2024-05-28 09:39:46:  0: INFO:   +Not overriding Show V-Ray Frame Buffer (VFB) setting
2024-05-28 09:39:56:  0: INFO:   +lightcache_preset_retraceThreshold set to #(2.0, 8.0)
2024-05-28 09:39:56:  0: INFO:   +lightcache_preset_subdivs set to #(1000, 3000)
2024-05-28 09:39:56:  0: INFO: >Performing XREF workaround...
2024-05-28 09:39:56:  0: INFO: >Completed XREF workaround.
2024-05-28 09:39:56:  0: INFO: >Scanning Renderer Paths...
2024-05-28 09:39:56:  0: INFO: >Done Scanning Renderer Paths.
2024-05-28 09:39:57:  0: Done executing plugin command of type 'Start Job'
2024-05-28 09:39:57:  0: Plugin rendering frame(s): 1
2024-05-28 09:39:57:  0: Executing plugin command of type 'Render Task'
2024-05-28 09:39:57:  0: INFO: Render Tasks called
2024-05-28 09:39:57:  0: INFO: Executing script: C:\ProgramData\Thinkbox\Deadline10\workers\jobsData\66558942f98806617cf7c537\Batch_BTT.ms
2024-05-28 09:41:09:  0: Done executing plugin command of type 'Render Task'
=======================================================
Details
=======================================================
Date: 05/28/2024 09:41:18
Frames: 1
Elapsed Time: 00:00:02:45
Job Submit Date: 05/28/2024 09:35:30
Job User: victor
Average RAM Usage: 18620608512 (28%)
Peak RAM Usage: 23435108352 (35%)
Average CPU Usage: 14%
Peak CPU Usage: 100%
Used CPU Clocks (x10^6 cycles): 2451578
Total CPU Clocks (x10^6 cycles): 17511266

=======================================================
Worker Information
=======================================================
Worker Name: 
Version: v10.1.23.6 Release (773a6289d)
Operating System: Windows 10 Pro
Running As Service: No
Machine User: victor
IP Address: 192.168.100.161
MAC Address: 10:7B:44:90:B0:AE
CPU Architecture: x64
CPUs: 32
CPU Usage: 7%
Memory Usage: 21.6 GB / 63.9 GB (33%)
Free Disk Space: 419.040 GB (26.796 GB on C:\, 392.244 GB on D:\)
Video Card: NVIDIA GeForce GTX 1080 Ti
Privacy | Site terms | Cookie preferences