The Monitor submitter lets you submit a Python script job in two different ways:
- Sending the .py script as an auxiliary file with the job, in which case no
ScriptFile= key value is expected. (“Submit Script File” checked in the GUI)
- Referencing a network location for the script file via the
ScriptFile= key. (“Submit Script File” unchecked in the GUI)
From your description it sounds like your attempt is a mix of the two approaches, resulting in the error message.
When you submit the job using the first approach, you have to call
deadlinecommand with three arguments - the two JOB files (where the PluginInfo.job file contains no
ScriptFile= entry), and the path to the script file as third argument. For example
deadlinecommand "c:\temp\JobInfo.job" "c:\temp\PluginInfo.job" "c:\temp\somefolder\myscript.py"
When the job has no
ScriptFile= key value, the Python job plugin grabs the third argument (the first auxiliary file) as the script to execute, and runs it.
If your PluginInfo.job does contain a
ScriptFile=\\some\path\myscript.py reference to a network-located copy of the script to run, then no auxiliary file is expected, and the file references by the
ScriptFile= key value will be executed. In that case, you would simply call
deadlinecommand "c:\temp\JobInfo.job" "c:\temp\PluginInfo.job"
Technically speaking, even if you provide an auxiliary file to the submission, it will not be used if there is a
ScriptFile= entry in the PluginInfo.job file.
If the PluginInfo.job file you fished out from the Repository did NOT contain a
ScriptFile= key, and you did not provide an auxiliary file for the script, then neither mode would work.
The DeadlineWorker checks to see if there is a
ScriptFile= entry in the PluginInfo.job file, and if there is none, it defaults to the first auxiliary file. You can find this logic around line 64 of
def RenderArgument( self ):
scriptFile = self.GetPluginInfoEntryWithDefault( "ScriptFile", self.GetDataFilename() )
scriptFile = RepositoryUtils.CheckPathMapping( scriptFile )
GetDataFilename() returns the first auxiliary file, and is used as the second argument to
GetPluginInfoEntryWithDefault() which sets the default. In other words, if the first argument is not found in the file, it uses the second argument instead.
So in the above code, if “ScriptFIle” is not found, and there is no first auxiliary file either, then the
scriptFile variable will not contain anything usable…