AWS Thinkbox Discussion Forums

ExecuteScript | Import Error

I want to use a 3rd party library. For example, the Deadline Standalone API but it throws such an import error.

PS C:\Users\AdminTest\Desktop> & "C:\Program Files\Thinkbox\bin\deadlinecommand.exe" -executescript
Qt: Untested Windows version 10.0 detected!
Error: ImportError : No module named DeadlineConnect
  File "C:\Users\AdminTest\Desktop\", line 1, in <module>
    from Deadline.DeadlineConnect import DeadlineCon as Connect

I have added Deadline Standalone API library to C:\Program Files\Thinkbox\bin\pythonsync, C:\Program Files\Thinkbox\bin\Lib\site-packages here.

Thanks :slight_smile:

Hi ,

The error your getting, is because your using the python standalone api in a python scripting context.

in a nut shell, if your using the standalone python scripting api, then us need a webservices node to communication with, you would just run:


The path to the python standaone api would need to be in your pythonpath or sys.path.append() in your script.

You would only ever call :slight_smile:

"C:\Program Files\Thinkbox\bin\deadlinecommand.exe" -executescript

if you had written your code with the deadline python scripting api.

Confusing , Tell me about it…

The standalone python api docs can be found here:

The deadline scripting here:

Hope this helps.

Thanks, but that’s not what I mean. I’ve already written the whole system with standalone api. But I need deadline scripting. I have to run with -executescript for it.

The problem is they are mutually exclusive, you cant really mix them.
you could try to import the standalone api into a scripting session … but i wouldnt recommend it, sure its good for some situations.

@eamsler you have to have a good explanation why this is not the best way to work?

I need. For example, I need to do a lot of work when the job starting. Send mail, log write, cost calculation etc.

Hey guys,

The big issue with mixing them is that the namespaces collide and the standalone API is masked off after loads in the virtual modules from C#. Here’s some code for example:

import Deadline.DeadlineConnect as Thing1
import Deadline.Scripting as Thing2

Even with Deadline configured to use your site-packages you’ll see this:

c:\Program Files\Thinkbox\Deadline10\bin>deadlinecommand executescript C:\Users\me\Downloads\
Qt: Untested Windows version 10.0 detected!
Error: ImportError : No module named DeadlineConnect
  File "C:\Users\me\Downloads\", line 1, in <module>
    import Deadline.DeadlineConnect as Thing1

For how to add Python modules, you can check the docs here.

Update: You could do something sneaky like rename the “Deadline” folder in your site-packages to “DeadlineConnect”. That’ll at least fix the conflict, but all of your imports will be non-standard.

1 Like

I’m confused on why deadline would design it this way. It’s seems like a mistake that no one cared to go back and fix. This is unfortunate.

1 Like

Created an account just to rant about this. How come it is still a problem years after? This is terrible design.

Here’s a way to import the Deadline Python API when running on a node:

spec = importlib.util.spec_from_file_location(
module = importlib.util.module_from_spec(spec)
sys.modules["DeadlineSucks"] = module
from DeadlineSucks import DeadlineConnect
Privacy | Site terms | Cookie preferences