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

**URL:** <https://community.shotgridsoftware.com/t/sgtk-bootstrap-toolkitmanager-not-working-on-deadline-farm-cmdline/13263>\
**Category:** Pipeline Integrations\
**Created:** [August 20, 2021, 12:31pm UTC](https://community.shotgridsoftware.com/t/sgtk-bootstrap-toolkitmanager-not-working-on-deadline-farm-cmdline/13263 "2021-08-20T12:31:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![benwall](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/benwall/32/1386_2.png) [@benwall](https://community.shotgridsoftware.com/u/benwall)\
**Post date:** [August 20, 2021, 12:31pm UTC](https://community.shotgridsoftware.com/t/sgtk-bootstrap-toolkitmanager-not-working-on-deadline-farm-cmdline/13263/1 "2021-08-20T12:31:45Z")

</div>

Hello,  
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:

```auto
sgtk.LogManager().initialize_custom_handler()

authenticator = sgtk.authentication.ShotgunAuthenticator()
user = authenticator.create_script_user(
    api_script=' **********************',
    api_key=' **********************',
    host='https:// **********************.shotgunstudio.com',)
sgtk.set_authenticated_user(user)

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

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

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

```

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?

Thanks,  
Ben

---

<div class="post-metadata">

**Author:** ![benwall](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/benwall/32/1386_2.png) [@benwall](https://community.shotgridsoftware.com/u/benwall)\
**Post date:** [August 20, 2021, 12:57pm UTC](https://community.shotgridsoftware.com/t/sgtk-bootstrap-toolkitmanager-not-working-on-deadline-farm-cmdline/13263/2 "2021-08-20T12:57:49Z")

</div>

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?
