problem with commandScript Plugin

Hi, I am getting this error when running a commandScript job

2016-02-03 10:15:29: 0: An exception occurred: Error: IndexError : array index out of range (Python.Runtime.PythonException)
2016-02-03 10:15:29: File “none”, line 47, in PreRenderTasks
2016-02-03 10:15:29: at Deadline.Plugins.ScriptPlugin.RenderTasks(String taskId, Int32 startFrame, Int32 endFrame, String& outMessage, AbortLevel& abortLevel) (Deadline.Plugins.RenderPluginException)

To fix the problem we need to substract 1 to the self.GetStartFrame() so that the job’s frame 1 will pick up the file line 0 and not the file line 1

47: line = lines[self.GetStartFrame() - 1].strip()

This bug can be recreated by submitting a commandScript job with a file containing only 1 command on the first line

Also, I have problem with the environment variables in this plugin.
Even if I add the environment PATH with values in it, it doesn’t get appended to the variable PATH for some reason

Hey Sylvain,

I didn’t seem to have a problem here. Are submitting a CommandScript Job from Deadline Monitor or Command Line? Are there any blank lines in your file?

Regards,

Charles

Also, which version of Deadline are you using? I don’t remember having this problem over the years, but we should probably look into it.

Sending the command line plugin might be helpful if you’re willing to go the extra mile. You can find that in “[repo]/plugins/” as the “CommandScript” folder.

I just realized that when submitting from the Monitor submission Dialog the first frame is frame 0

We usually submit from a custom plugin and we are sending the first frame as frame 1 instead of 0

We can just modify our submit script to use frame 0 to #number_of_lines