AWS Thinkbox Discussion Forums

Full command working in cmd but reporting System.Exception in Deadline

Hi,

  • We wrote a hython.py to be able to handle the minor version choice from the job submission
  • Tested successfully on both Linux and Windows as a standalone
  • Tested successfully on Linux in a Deadline job.
  • On Windows, through Deadline, it reports a System.Exception, however if I copy/paste the Full command from Deadline log in a command prompt, it works perfectly.

Out of curiosity, I tried, making the hython.py file containing just a print function to check if it could be the shebang line used to execute in Linux or any library I’m using but the issue is the same. I had the DOS signature issue before and switched the “Houdini Build To Force” option to None as seen in older posts.

I ran out of idea to find where this problem come from, hope someone can help us :slight_smile:

Here is the log :

=======================================================
Error

Error starting “O:\bin\hython.py” in “O:\bin” : (System.Exception)
at FranticX.Processes.ChildProcess.a(String A_0, String A_1, String A_2)
at FranticX.Processes.ManagedProcess.Execute(Boolean waitForExit)
at Deadline.Plugins.DeadlinePlugin.DoRenderTasks()
at Deadline.Plugins.PluginWrapper.RenderTasks(String taskId, Int32 startFrame, Int32 endFrame, String& outMessage, AbortLevel& abortLevel)
at Deadline.Plugins.PluginWrapper.RenderTasks(String taskId, Int32 startFrame, Int32 endFrame, String& outMessage, AbortLevel& abortLevel)

=======================================================
Type

RenderPluginException

=======================================================
Stack Trace

at Deadline.Plugins.SandboxedPlugin.a(DeadlineMessage A_0)
at Deadline.Plugins.SandboxedPlugin.RenderTask(String taskId, Int32 startFrame, Int32 endFrame)
at Deadline.Slaves.SlaveRenderThread.a(TaskLogWriter A_0)

=======================================================
Log

2017-08-10 14:13:36: 0: Loading Job’s Plugin timeout is Disabled
2017-08-10 14:13:38: 0: Executing plugin command of type ‘Sync Files for Job’
2017-08-10 14:13:38: 0: All job files are already synchronized
2017-08-10 14:13:38: 0: Plugin Houdini was already synchronized.
2017-08-10 14:13:38: 0: Done executing plugin command of type ‘Sync Files for Job’
2017-08-10 14:13:38: 0: Executing plugin command of type ‘Initialize Plugin’
2017-08-10 14:13:39: 0: INFO: Executing plugin script ‘C:\Users\chris\AppData\Local\Thinkbox\Deadline9\slave\wbox03\plugins\598ab9f158fe7f627c391499\Houdini.py’
2017-08-10 14:13:39: 0: INFO: About: Houdini Plugin for Deadline
2017-08-10 14:13:39: 0: INFO: Render Job As User disabled, running as current user ‘chris’
2017-08-10 14:13:39: 0: INFO: The job’s environment will be merged with the current environment before rendering
2017-08-10 14:13:39: 0: Done executing plugin command of type ‘Initialize Plugin’
2017-08-10 14:13:39: 0: Start Job timeout is disabled.
2017-08-10 14:13:39: 0: Task timeout is disabled.
2017-08-10 14:13:39: 0: Loaded job: sphereScatterA (v001_01) (598ab9f158fe7f627c391499)
2017-08-10 14:13:39: 0: Executing plugin command of type ‘Start Job’
2017-08-10 14:13:39: 0: Done executing plugin command of type ‘Start Job’
2017-08-10 14:13:39: 0: Plugin rendering frame(s): 1-5
2017-08-10 14:13:40: 0: Executing plugin command of type ‘Render Task’
2017-08-10 14:13:40: 0: INFO: Starting Houdini Job
2017-08-10 14:13:40: 0: INFO: Stdout Redirection Enabled: True
2017-08-10 14:13:40: 0: INFO: Stdout Handling Enabled: True
2017-08-10 14:13:40: 0: INFO: Popup Handling Enabled: True
2017-08-10 14:13:40: 0: INFO: QT Popup Handling Enabled: False
2017-08-10 14:13:40: 0: INFO: WindowsForms10.Window.8.app.* Popup Handling Enabled: False
2017-08-10 14:13:40: 0: INFO: Using Process Tree: True
2017-08-10 14:13:40: 0: INFO: Hiding DOS Window: True
2017-08-10 14:13:40: 0: INFO: Creating New Console: False
2017-08-10 14:13:40: 0: INFO: Running as user: chris
2017-08-10 14:13:40: 0: INFO: Executable: “O:\bin\hython.py”
2017-08-10 14:13:40: 0: INFO: Argument: --version 16.0.557 “C:\Users\chris\AppData\Local\Thinkbox\Deadline9\slave\wbox03\plugins\598ab9f158fe7f627c391499\hrender_dl.py” -f 1 5 1 -d /obj/geo1/sphereScatterA/To_Fetch “//server/chris/hip/deadline/testFarmB.v001_01_20170809162952.hip”
2017-08-10 14:13:40: 0: INFO: Full Command: “O:\bin\hython.py” --version 16.0.557 “C:\Users\chris\AppData\Local\Thinkbox\Deadline9\slave\wbox03\plugins\598ab9f158fe7f627c391499\hrender_dl.py” -f 1 5 1 -d /obj/geo1/sphereScatterA/To_Fetch “//server/chris/hip/deadline/testFarmB.v001_01_20170809162952.hip”
2017-08-10 14:13:40: 0: INFO: Startup Directory: “O:\bin”
2017-08-10 14:13:40: 0: Done executing plugin command of type ‘Render Task’

=======================================================
Details

Date: 08/10/2017 14:13:42
Frames: 1-5
Elapsed Time: 00:00:00:06
Job Submit Date: 08/09/2017 16:29:24
Job User: chris
Average RAM Usage: 2731663360 (5%)
Peak RAM Usage: 2731663360 (5%)
Average CPU Usage: 14%
Peak CPU Usage: 33%
Used CPU Clocks (x10^6 cycles): 2790
Total CPU Clocks (x10^6 cycles): 19928

=======================================================
Slave Information

Slave Name: wbox03
Version: v9.0.6.1 Release (96b611826)
Operating System: Windows 10 Pro
Running As Service: No
Machine User: chris
IP Address: 10.0.3.103
MAC Address: 08:00:27:24:96:80
CPU Architecture: x64
CPUs: 12
CPU Usage: 10%
Memory Usage: 2.5 GB / 62.5 GB (4%)
Free Disk Space: 93.956 GB
Video Card: Microsoft Basic Display Adapter

The issue here is that on Windows, there is no hashbang “#!/usr/bin/env python” support like you’d see in most Unix shells.

For this, you’ll need to call Hython or Python directly and pass it your Python script as an argument.

Thanks for your answer,

actually Windows does not support the hashbang indeed but it is able to run a .py file by itself as the system associates it to Python application automatically. If writing the exact same command that Deadline uses in a command prompt makes it work, what is the difference that makes it not working when Deadline runs it ?

Also the Houdini simtracker from the Houdini plugin or some other plugin that I forgot also call a .py directly, what makes the difference ?

Ah, it looks like Windows command prompt added some tricks up its sleeve! That’s rather nice. I went on a little adventure to test Win 10, Server 2012 R2, and Windows 7 and those all support opening a file with an associated application so that’s been around awhile. :smiley:

We’re using this C# class to launch processes on Windows:
msdn.microsoft.com/en-us/librar … s(v=vs.110.aspx

That’s pretty explicit on what it wants to run and doesn’t do the helper work of finding the program associated with the file. I bet if we re-implemented our own metaphorical wheel to use the shellexecute Windows API function it’d do that. That would be a big undertaking.

For now unfortunately you’ll have to give Deadline a path to the right binary to run.

Got it ! It’s great to know there is a good reason at least ^^
I made a little .bat wrapper to call Python with our custom hython.py and the rest of the arguments and it works great so no problem this way for both Linux and Windows.

Thanks !
Chris

Welcome Chris!

Privacy | Site terms | Cookie preferences