I’m getting a RuntimeError from Python when I try to submit a Draft job. It seems associated with the importing of the Draft module:
I’ve attached the full log for this task. I tried a few of the Sample scripts to make sure this is a real problem, not just from my own ignorance. Seems to consistently fail on the import Draft line.
Not sure if it’s worth mentioning, but we don’t have OpenOffice installed on the machines in question. Not sure why Draft would look for it though.
Edit: It seems that the Draft init only fails on a certain pool of machines. For various reasons we’re running Deadline on those machines in the pre-login environment (as services). Could there be some python-sys issues with permissions, etc maybe? I forced it to run on my own workstation now and it initialized just fine.
It sounds rather like it’s finding something on the path before it gets to the right place that makes it think it has found what it wants, but it hasn’t actually. Can you run the attached script and let me know what the output is?
Okay Daniel… so, you see that space in the path? After “C:\PROGRAM FILES\OPENOFFICE.ORG 3\URE\BIN;” but before “C:\PROGRAM FILES (X86)\OPENOFFICE.ORG 3\URE\BIN;”? Take out the space. Then give Draft another try. Putting a space in my path was enough to break things for me here.
It would be best if someone were to fix the paths properly and permanently, but, until then, placing the following lines of code before your “import Draft” statement should do the trick (I tested it in a script run on the command line, not through Deadline):
import os
import string
orig_path = os.environ[ 'PATH' ]
modified_path = string.replace( orig_path, '; ', ';' )
os.environ[ 'PATH' ] = modified_path
Note: According to https://docs.python.org/2/library/os.html, “On some platforms, including FreeBSD and Mac OS X, setting environ may cause memory leaks.”
Edit: Jon thinks it should still work when the script is run through Deadline, and Paul figured out where (internal to Draft) the malformed path is causing problems… so this work-around probably won’t be necessary in future releases. Until then, this work-around should fix things for you.