From first glance it appears that the issue you are running into is that you are setting both submit_info and job_info to be the contents of the same file.
This means that all of the information that the plugin needs is missing.
A second issue with your submission script is you currently are not including the scene file with your submission. In order to include it you will need include the scene you can use the aux argument.
That was my first try. No project file, throwing error:
Error: 'C:\Users\AdminTest\Desktop\submit\16.01.2019_02_17_12\3dsmaxScene-2018.max' yolunun bir parçası bulunamadı. (System.IO.DirectoryNotFoundException)
Initialize: Error: GetIntegerPluginInfoEntry: Could not parse value for key: Version into an integer because: GetPluginInfoEntry: Script accessed non-existent plugin info key: Version (Deadline.Plugins.RenderPluginException)
In the plugin info data set, your missing a key, value pair that determines the Version.
Once that is provided to the plugin , it should render on the farm.
Another way to do this a little cleaner, is use the deadline submitter, to submit a simple job.
Then right click on the job, look at submission Params, make sure that the plugin info that you provide containns all the key, value pairs that the simple job has, that way you know that the plugin shouldnt fail with any other “Could not parse value for key” errors.
Why do you not understand? I’m getting a key error. I didn’t make it, and I opened a topic subject here. But you say what I do. I already did this. As you can see, the files of a job already done. I want to test directly over those files so there is no risk. These are the files of a successful job.(AppData\Local\Thinkbox\Deadline10\temp\16.01.2019_02_17_12)
That was the first time. Then when I looked at the API, I saw that it was already doing.
def SubmitJob(self, info, plugin, aux = [], idOnly = False):
""" Submit a new Job.
Input: info: Dictionary of Job information.
plugin: Dictionary of Plugin information for the Job.
aux: Array of any additional auxiliary submission files, defaults to empty.
idOnly: If True, only the Job's ID is returned, defaults to False.
Returns: The new Job.
"""
if not isinstance(aux, list):
aux = [aux]
body = '{"JobInfo":'+json.dumps(info)+',"PluginInfo":'+json.dumps(plugin)+',"AuxFiles":'+json.dumps(aux)
if idOnly:
body += ',"IdOnly":true'
body += '}'
return self.connectionProperties.__post__("/api/jobs", body)
As Grant explained in his first reply, a job submission requires either 3 arguments (the submit info and job info .job files, and the .MAX scene file as aux. file), or two arguments (just the two .job files, where the job info file contains a key called SceneFile= pointing at the network location of the .MAX scene file).
In your case, your submission call only uses the two job files, but the SceneFile is not included in the job info file (at least not in the one you attached). Since the files you are testing with were created from another submitter that that included the MAX file in the command line call, you MUST use the 3 arguments approach in your submission, or the job will not work.
If you did include the .MAX file in the submission, please clarify and post the example where you did that. The samples you have posted define the location of the .MAX file in a variable, but it is unclear what happens to it after that…
The initial problem with the undefined key error was, as Grant also pointed out, because you used the wrong argument to generate the job_info JSON. I assume you solved that problem.
It is unclear to me where the error
Error: 'C:\Users\AdminTest\AppData\Local\Thinkbox\Deadline10\temp\16.01.2019_02_17_12\3dsmaxScene-2018.max' yolunun bir parçası bulunamadı. (System.IO.DirectoryNotFoundException)
comes from. Can you provide more info about what code is throwing that?
In the MAXScript code producing the .job files, we specifically enforce UTF-8 with BOM:
local JobInfoFile = CreateFile filename encoding:#utf8 writeBOM:true
This is because otherwise language-specific paths and names (e.g. Turkish, Bulgarian, German, French, etc.) containing special characters would be mangled and could break the job. There is a global switch in 3ds Max’s Preferences to enforce this, and some customers had it on, and some had it off, causing headaches for our support team. So eventually we hard-coded the encoding mode to enforce UTF-8 with BOM in all text output calls within the Submit Max To Deadline code.
So these files are not pure ASCII, they are in fact Unicode, and you must consider that when reading from python. At least you could skip the first three characters of any file you read…