Problem submitting Maxscript Job from maxscript

Hi I try to make my own submitter, but first it won’t work when I submit it via maxscript but the template work well when submitted via default SMTD.
So I decide to follow simply your Tutorial on Deadline site…
Here’s the deal, exactly the same problem…If I run the job template throw the submitter everything perform well (so part of your own tutorial THE MAXSCRIPT JOB TEMPLATE to SIMPLE EXEMPLE SCRIPT work perfectly…)
But as soon as I sumit the same template via the maxscript submitter (just path edit to match file, else it’s exactly copy pasting, from your tutorial), it simply won’t work and returm me "Error: RenderTask: Unexpected exception (Exception caught in 3ds max: – Syntax error: at bad, expected ".

Evaluate the template locally work also (from maxscript editor / evaluate all )

Running the all script (from template SMTD inside listener, give me exactly the same error)

What’s wrong, is it only me, and what am I doing wrong?

Is there something change since the tutorial edit?

I’am using using Max 2016 sp1 ext1 and Deadline 7.1.2

Nothing has changed in Deadline or the tutorial that I am aware of, but the error message means there is a syntax error, which could as well mean a bad character or formatting issue that is not directly related to the actual code.

Can you please zip up and attach the exact template script that is causing you problems?
I want to try to run it here and see what it says…

Another thing you can do is adding debug prints to the script (using du.LogMessage()) to see how far it gets before the error occurs.
Once it fails, you can check out the job log and see which debug prints appear and which don’t to get an idea where it failed…

In fact simple remaking the teapot export to .3ds sequence tutorial from the site is going wrong…
Using SMTD, running the script locally (open max, open scene, utility/maxscript/run choose the template, or evaluate it from the max editor is perfectly fine, all run smothly and work, same for all templates I do…

But when I am using the submitter part from the tutorial just editing manually my Repository path task fail.

Find attached the submitter part and the template part…
I have added comment but use one do not have it…each time it failed with the error from first post, but do not perform the task (slave, open file, then wait a moment, then error, max close, and things restart).

This thing make me crazy…MAXScriptJob_teapot script_242459.zip (1.89 KB)

edit1:
ok I have it reading the slave log.
Error happened when reading the scirpt.

"0: INFO: Executing script: C:\Users\marco\AppData\Local\Thinkbox\Deadline7\slave\BankizX\jobsData\55df272a5799983310627ae0\teapottestscriptscene.max
" looks like I’m more reading the scene than the script , that’s answer me error, but not why I am reading the scene…

edit2: Ok after severall try, that’s the problem, when running via smtd, the slave try to run the script, so it perform well, but when using max script submission it tryc to lunch the scene as script (submission part is directly take from the website)…So…

Now Where & how to resolve this issue?

I tested your submitter and your script and could not immediately reproduce the problem you experienced.

However, I can imagine a case where you modified your SMTD Settings via the SMTD UI that would cause the MAX file to be read as the script file.
The default submission mode of SMTD is “orange” - “SAVE and Submit Current Scene File with the Job to the REPOSITORY”. In this mode, the submission must contain the .MAX file as 3rd command line argument, and the .MS file comes 4th.
But if you switch to a mode that does NOT submit the scene file with the job, the .MAX file path becomes an entry of the Job file, and is NOT expected in the command line arguments. Since we call

SMTDFunctions.CreateSubmitInfoFile SubmitInfoFile SMTDFunctions.CreateJobInfoFile JobInfoFile
the resulting Job files respect ALL settings of SMTD applied via the UI, and would also include the .MAX file.
But the building of the command line explicitly includes the MAX file that we saved, too.

When the Slave picks up the job, it finds the .MAX file in the submission settings and goes looking for it on the network, and assumes there was no MAX file in the command line list as 3rd argument. So it expects the 3rd argument (first auxiliary file of the submission) to be the MAXScript file, and so it tries to load the .MAX file as the script source…

As soon as I switched the SMTD UI to “cyan” mode (“DO NOT SAVE And Use Current Scene’s ORIGINAL NETWORK PATH”), I got the error you reported…

I wanted to keep the sample script as short as possible, so it does not check for all possible custom SMTD settings. I will have to add a note to the tutorial that the submission mode should be set to “orange” to function correctly. Alternatively, we can enforce it via the submission MAXScript by adding the line

SMTDSettings.SubmitSceneMode = #reposave --> Force save and submit mode local maxFileToSubmit = SMTDPaths.tempdir + maxFileName SMTDFunctions.SaveMaxFileCopy maxFileToSubmit ...
to ensure the scene file is expected with the submission…

SMTD is a Beast and it is totally possible to set one of its hundreds settings to something incompatible with what you are trying to achieve using direct MAXScript access. But on the other hand it has the benefit of significant power and flexibility. The SMTD UI would not produce this problem as it changes the command line arguments depending on the submission mode.

Hope this helps!

:blush: :blush: :blush:
I love You, now it’s working like a charm…
Thanks, I didn’t suspect my repo save option…That’s the trick…Perfect and thanks for all…
2 days I search for what’s going wrong on a much larger script…Thanks for all…