AWS Thinkbox Discussion Forums

Can not import Draft in Event

Can you guys think of any reason why it would not be able to find the Draft module for import in a event plugin?

I’m writing a new event and when I try to import Draft I get an error saying “No module named Draft”
I’ve tried appending the location to the sys.path and it doesn’t help.

And draft actually works when submitting a Draft job… for some reason my event just wont find it.

any clues?

thanks,
andrew

Ideas:

  1. Make sure your script is using Python 2.7.
  2. Check your python path (PYTHONPATH) is set correctly (this is where Python looks to find where Draft is).
  3. The MAGICK_CONFIGURE_PATH should also be set, but that should only cause problems with fonts if it isn’t set.

What OS are you using?

Cheers,
Andrea

Hey Andrew,

I’m assuming this is a custom event plugin – one thing to note about all of our scripts in Deadline is that they use IronPython by default. IronPython won’t be able to import Draft because it has trouble with most cpython libraries.

Try adding “#Python.Net” as the first line in your script, to signal to Deadline that it should use Python.NET to run it. I’m pretty sure that should fix it :slight_smile:

EDIT: You might still run into issues with some stuff if the MAGICK_CONFIGURE_PATH isn’t set to the Draft directory, like Andrea mentioned. I’d make sure to set that too, if you haven’t already.

Cheers,

  • Jon

Awesome thanks! It was the #Python.NET

I knew it had to be something simple. :slight_smile:

Privacy | Site terms | Cookie preferences