sgtk.bootstrap.ToolkitManager() not working on Deadline farm cmdLine

I’m trying to bootrstrap SGTK in a deadline command line job to publish exported alembics from maya.standalone (on windows).

The code works without any problem in a local cmd launched on my computer, but it crash on Deadline and I don’t get any error message:


authenticator = sgtk.authentication.ShotgunAuthenticator()
user = authenticator.create_script_user(

# bootrstrap based on distributed config
mgr = sgtk.bootstrap.ToolkitManager()

mgr.base_configuration = 'sgtk:descriptor:path?windows_path=*****/*****
mgr.plugin_id = ''

project = {"type": "Project", "id": 155}
engine = mgr.bootstrap_engine("tk-shell", entity=project)

I tried commenting each line from the bottom of the script to see where the problem is exactly, and it seems it works in the deadline job up until I call mgr = sgtk.bootstrap.ToolkitManager()

print(help(sgtk.bootstrap)) or print(help(sgtk.bootstrap.ToolkitManager)) just before calling ToolkitManager gives me the same thing on the farm and in local

Is there any explanation I’m not seeing here? Why would it be different on a cmd launched on the farm and a cmd on my local computer?


Okay, I found the problem:

sgtk.set_authenticated_user(user) does not seem to work on the farm, sg_user must be passed as an argument when instanciating ToolkitManager

mgr = sgtk.bootstrap.ToolkitManager(sg_user=user)

Is there any reason for it to work in local but not on a farm?

1 Like