Error Message: Missing parentheses in call to 'print'

I have 4 machines with what i thought were identical settings/installs and version numbers etc.

For some reason one of the slaves throws this error in monitor and i have no idea why.

Anyone have a suggestions of where to look? or how to interpret this?

Thanks,

Paul

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

FailRenderException : Error: Missing parentheses in call to ‘print’. Did you mean print(“Appending “” + path + “” to system path to import SubmitDeadlineRop module”)?
at Deadline.Plugins.DeadlinePlugin.FailRender(String message) (Python.Runtime.PythonException)
File “C:\ProgramData\Thinkbox\Deadline10\workers\Montecarlo\plugins\61f9484b12e15b29c0d0d5a6\Houdini.py”, line 438, in HandleStdoutError
self.FailRender(self.GetRegexMatch(1))
at Python.Runtime.Dispatcher.Dispatch(ArrayList args)
at __FranticX_Processes_ManagedProcess_StdoutHandlerDelegateDispatcher.Invoke()
at FranticX.Processes.ManagedProcess.RegexHandlerCallback.CallFunction()
at FranticX.Processes.ManagedProcess.e(String di, Boolean dj)
at FranticX.Processes.ManagedProcess.Execute(Boolean waitForExit)
at Deadline.Plugins.DeadlinePlugin.DoRenderTasks()
at Deadline.Plugins.PluginWrapper.RenderTasks(Task task, String& outMessage, AbortLevel& abortLevel)
at Deadline.Plugins.PluginWrapper.RenderTasks(Task task, String& outMessage, AbortLevel& abortLevel)

Calling print without parentheses has been deprecated for a long time. My guess is this host is running either a different version of Deadline, or Python.

Thanks for the reply mois.moshev - Monitor says that all slaves are running the same client versions. So not sure it could be that. All the machines are using the python thats bundled with Deadline. For example checking Python version in powershell just returns a “no python installed” message.

I see you can speficify the python version used by deadline in the repository options now - i tried setting to 3 explicity (it was on 2) but it’s not changed the situation atall.

Thanks,

Paul

Well, on 3 this will certainly not work, because print without parentheses is a syntax error.
You should open the Houdini plugin in repo/plugins/Houdini/Houdini.py and put parentheses in the print calls, so as the message says: print(“Appending “” + path + “” to system path to import SubmitDeadlineRop module”).
I guess your Deadline might be old, because your Houdini plugin certainly is, and it goes with the repo (unless you have modifications in the custom directory).

Hey,

Thanks for the suggestion - ok i’ll give that try.

All machines are reported as running 10.1.20.3 in monitor, which i believe is the latest build

Your plugin is old. Check if you have a custom one under repo/custom/plugins/Houdini, which might be out of date. In this case, merge the changes from repo/plugins/Houdini.
If not, I don’t know why the plugins did not get updated - this is a very new version of Deadline and already has supported python 3 for a while.

I just saw this today on our pipeline, and realized - the Deadline hda needs to be updated, if it has been fixed in the new version at all. Otherwise it is a small change needed, will do it the coming week.

1 Like

Here is the Python Module - to use it right click the Deadline ROP, select “Type Properties”, in the dialog go to the scripts tab, select Python Module and replace the contents with this:

import hou
import sys
import traceback

try:
    from CallDeadlineCommand import CallDeadlineCommand
except:
    pass

def SubmitToDeadline():
    if "CallDeadlineCommand" in sys.modules:
        # Get the repository path
        path = CallDeadlineCommand( [ "-GetRepositoryPath", "submission/Houdini/Main" ] ).strip()
        if path != "":
            path = path.replace( "\\", "/" )
            
            # Add the path to the system path
            if path not in sys.path :
                print("Appending \"" + path + "\" to system path to import SubmitDeadlineRop module")
                sys.path.append( path )
                
            # Import the script and call the main() function
            try:
                import SubmitDeadlineRop
                SubmitDeadlineRop.SubmitToDeadline()
            except:
                print( traceback.format_exc() )
                print( "The SubmitDeadlineRop.py script could not be found in the Deadline Repository. Please make sure that the Deadline Client has been installed on this machine, that the Deadline Client bin folder is set in the DEADLINE_PATH environment variable, and that the Deadline Client has been configured to point to a valid Repository." )
        else:
            print( "The SubmitDeadlineRop.py script could not be found in the Deadline Repository. Please make sure that the Deadline Client has been installed on this machine, that the Deadline Client bin folder is set in the DEADLINE_PATH environment variable, and that the Deadline Client has been configured to point to a valid Repository." )
    else:
        print( "Unable to locate 'CallDeadlineCommand.py', please ensure your Deadline ROP installation is correct." )
        hou.ui.displayMessage( "Unable to locate 'CallDeadlineCommand.py', please ensure your Deadline ROP installation is correct.", title="Submit Houdini To Deadline" )

and in PreFirstCreate you also have to fix the prints:

import hou
import json
import sys

try:
    from CallDeadlineCommand import CallDeadlineCommand
except:
    print( "Unable to locate 'CallDeadlineCommand.py', please ensure your Deadline ROP installation is correct." )

 # If 'IS_HOUDINI_RENDERING' is 'TRUE', don't sync file from deadline repository.  We don't need these files during rendering time.
if hou.getenv('IS_HOUDINI_RENDERING') != 'TRUE':
    if "CallDeadlineCommand" in sys.modules:
        subInfo = json.loads( CallDeadlineCommand( [ "-prettyJSON", "-GetSubmissionInfo", "Pools", "Groups", "MaxPriority", "TaskLimit", "UserHomeDir", "RepoDir:submission/Houdini/Main", "RepoDir:submission/Integration/Main", "RepoDirNoCustom:draft", "RepoDirNoCustom:submission/Jigsaw", ] ) )    
    else:
        subInfo = { "result" : { "Pools": ["none"], "Groups":["none"], "MaxPriority": 100, "TaskLimit": 5000, "UserHomeDir":"", "RepoDirs":{ "submission/Houdini/Main":"", "submission/Integration/Main":"", "draft":"", "submission/Jigsawegration/Main":"", "submission/Jigsaw":"" } } }
    hou.putenv( "Deadline_Submission_Info", json.dumps( subInfo["result"] ) )

When you are done, you can save the definition by clicking apply or accept.

1 Like

That’s it! thank you.