Hi all, I am working on a plugin that launches within Deadline and runs various python scripts.
Almost all of these scripts do what I want to do. I have encountered a problem that I cannot seem to find the answer anywhere so I hoping someone can point me in the right direction.
I need to be able to use the following modules
from Deadline.Scripting import RepositoryUtils
from System import Array, String
However, every time I try to run my Python script, I get the error that the modules don’t exist. I’ve tried finding them on my C: drive and where the repository is installed on a shared drive, but I’ve had not luck. No matter what I try, I always get the same error and I’ve run out of ideas now.
This relates to another question I posted here.
Thanks so much everyone.
The fun bit is that the Deadline module (assuming you’re using this API) is built with Python for .NET, so your imports to ‘regular’ python installs are going to fail. I’m not 100% sure what you’ve tried here, but the short answer is to run your script with:
deadlinecommand -ExecuteScript myscript.py
instead of
python myscript.py
and you’ll be able to use the Deadline module.
Hi Justin, thanks for that information.
Opening cmd and trying to run deadlinecommand to see if I have this installed gives me the error:
“deadlinecommand” is not recognized as an internal or external command, operable program or batch file.
Is there anything specific I need to have installed on my machine? We have Deadline 10.1.20.3 installed
Right! That’s assuming you’re running the command from wherever Deadline is installed on your machine. The path is stored in an environment variable called DEADLINE_PATH.
So for windows that looks like:
"%deadline_path%"\deadlincommand -executescript script.py