Ok, so I am relatively new to deadline but I am having a problem porting deadline 5 scripts to deadline 6. I have managed to update the UI in respect of PyQt but am having an issue with two dropdowns that are looking for pool items and group items. I understand that it needs to get information from the repository, so after a bit of reading, I found some reference in the documentation, which says I need to create a connection object:
import Deadline.DeadlineConnect as Connect
connectionObject = Connect.DeadlineCon(‘localhost’, 6428)
print connectionObject.Groups.GetGroupNames()
I have the localhost name and the port, however, when I run the above, I get an error:
ImportError: No module named Deadline.DeadlineConnect
Why is this? I have the right path set up so am in need of some assisstance. This has come about as there is a reference to a combobox in the script I am working with:
scriptDialog.AddControl( “Pool”, “PoolComboControl”, “animations”, dialogWidth - labelWidth - 24 - 200, -1 )
I have changed it in my sript to this:
scriptDialog.AddComboControl( “Pool”, “PoolComboControl”, “animations”, dialogWidth - labelWidth - 24 - 200, -1 )
It creates the object in the UI, but no items due to not obtaining the info from the repsitory.
I also created a version that listed the items, but this list is meaningless unless it is connected in another way.
PoolComboControl seems to be a class or redefined control that I cannot find access to. I am assuming that this has code within that does what I am looking for and populates the combobox with information from the repsitory in respect of what pool/group is required. As I had no luck in tracking this down, I went for the option at the top to see if I could get the info myself, but have hit a stumbling block.
As mentioned, I am trying to populate the pool dropdown/combo box and the group dropdown/combo box.
I created a script from the code at the top, using my local host and port number and ran this in the command prompt. I realise that there is a difference in the python, but at this point, I am trying everything:
U:>c:
C:>cd C:\Program Files\Thinkbox\Deadline\bin
C:\Program Files\Thinkbox\Deadline\bin> deadlinecommand.exe executescript mja_DeadlineCreateConnectObject.py
Oncfe done, I got an error dialog stating:
Python Error: No module named DeadlineConnect(IronPython.Runtime.Exceptions.ImportException)
I also received an error when I ran the same script in the Deadline 6 folder:
C:\Users\armstrongm>cd C:\Program Files\Thinkbox\Deadline6\bin
C:\Program Files\Thinkbox\Deadline6\bin>deadlinecommand.exe executescript mja_DeadlineCreateConnectObject.py
Error: Python Error: ImportError : No module named DeadlineConnect (Python.Runtime.PythonException)
Stack Trace:
[’ File “none”, line 1, in \n’]
(System.Exception)
So, I am not clear on whats happening here and hope that someone can shed some light on it for me.
many thanks