AWS Thinkbox Discussion Forums

ImportError: DLL load failed: Draft module not found

Hi Jon.

No actually, my computer never had any Deadline Repository and/or Draft installation prior to the test I did. I received an answer from Andrea saying that I have many duplicates in my “Path” environment variable (actually, there was ONE duplicate) that may lead to the bug, but no. I’ll continue to check whatever may cause this, but if something come on your mind, please let me know.

Thanks
Maxime

I’m getting this now too. I used to just run:

sys.path.append("//sfs-file/deadlinerepository6/draft/Windows/64bit")
import Draft

and everything would work. Now it doesn’t.

Added the MAGICK env variables and still no dice:

It looks like you may be using a different version of Python. Draft is built for Python 2.6, but it appears that you’re using Python 2.7 instead.

If you don’t have your own copy of Python 2.6 installed, you can find Deadline’s copy here: C:\Program Files\Thinkbox\Deadline6\bin\dpython.exe

Does the new version of Draft work correctly on your Deadline Slaves?

What if you enter the following on the command prompt:

set PYTHONPATH=\\sfs-file\deadlinerepository6\draft\Windows\64bit set MAGICK_CONFIGURE_PATH=\\sfs-file\deadlinerepository6\draft\Windows\64bit "C:\Program Files\Thinkbox\Deadline6\bin\dpython.exe"
And then, in Python:

import Draft

?

In addition to what Paul posted (the wrong version of Python is definitely a problem), I think I recall that we tracked down this problem (or one like it) to a copy of Draft.pyd in the wrong location that was being found before the correct one, and the one in the wrong location didn’t have the other files. We used the following debugging script to track down the problem:

[code]import sys

print “sys.version =”, sys.version
print “sys.version_info =”, sys.version_info
print “sys.api_version =”, sys.api_version
print “sys.platform =”, sys.platform
print “sys.prefix =”, sys.prefix
print “sys.meta_path =”, sys.meta_path

print “\nsys.path:”
for path in sys.path:
print path

#print “\nsys.modules:”
#for key, value in sys.modules.iteritems():

if( value == None ):

print key

else:

print value

import os

print “\nos.environ:”
for key, value in os.environ.iteritems():
print “%25s = %s” % ( key, value )

import imp

try:
print “\nimp.find_module =”, imp.find_module( “Draft” )
except:
print ‘*** “imp.find_module( “Draft” )” failed***’

try:
import Draft

print "\n*** Draft imported successfully! ***"
print "Draft version", Draft.LibraryInfo.Version()

except:
print ‘\n*** “import Draft” failed ***’[/code]

The key line happens to be this one: print "\nimp.find_module =", imp.find_module( "Draft" )

If you still have problems after correcting the version of python, check to see where it thinks Draft is.

Any plans to update to 2.7 Python doesn’t appear to even make 2.6 binaries available for download anymore.

I’m not sure what the plan currently is (I’ll check on Monday), but you can get Python 2.6 here:
http://www.python.org/download/releases/2.6.9/

That’s just the source code. Although apparently there is a 2.6.6 binary available. Would that be compatible?

It looks like it was released in 2010. So that’s getting pretty long in the tooth.

Yes, 2.6.6 will work.

Deadline Python works.

[code]sys.version = 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)]
sys.version_info = sys.version_info(major=2, minor=7, micro=6, releaselevel=‘final’, serial=0)
sys.api_version = 1013
sys.platform = win32
sys.prefix = C:\Python27
sys.meta_path = []

sys.path:
C:/Users/ggreenwalt/Desktop
C:\Python27\Lib\idlelib
C:\WINDOWS\SYSTEM32\python27.zip
C:\Python27\DLLs
C:\Python27\lib
C:\Python27\lib\plat-win
C:\Python27\lib\lib-tk
C:\Python27
C:\Python27\lib\site-packages

os.environ:
TMP = C:\Users\GGREEN~1\AppData\Local\Temp
COMPUTERNAME = DAEDALUS
ILMDIR = C:\Program Files (x86)\Common Files\Autodesk Shared\Materials
USERDOMAIN = SFS
VRAY30_RT_FOR_3DSMAX2013_MAIN_X64 = C:\Program Files\Chaos Group\V-Ray\RT for 3ds Max 2014 for x64/bin
INTEL_DEV_REDIST = C:\Program Files (x86)\Common Files\Intel\Shared Libraries
PSMODULEPATH = C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
COMMONPROGRAMFILES = C:\Program Files\Common Files
PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 45 Stepping 7, GenuineIntel
PROGRAMFILES = C:\Program Files
PROCESSOR_REVISION = 2d07
SYSTEMROOT = C:\WINDOWS
HOME = C:\Users\ggreenwalt
MAGICK_FONT_PATH = \sfs-file\deadlinerepository6\draft\Windows\x64
PROGRAMFILES(X86) = C:\Program Files (x86)
COMSPEC = C:\WINDOWS\system32\cmd.exe
TK_LIBRARY = C:\Python27\tcl\tk8.5
TEMP = C:\Users\GGREEN~1\AppData\Local\Temp
COMMONPROGRAMFILES(X86) = C:\Program Files (x86)\Common Files
PROCESSOR_ARCHITECTURE = AMD64
TIX_LIBRARY = C:\Python27\tcl\tix8.4.3
ALLUSERSPROFILE = C:\ProgramData
USERPROFILE = C:\Users\ggreenwalt
LOCALAPPDATA = C:\Users\ggreenwalt\AppData\Local
HOMEPATH = \Users\ggreenwalt
USERDOMAIN_ROAMINGPROFILE = SFS
PROGRAMW6432 = C:\Program Files
VRAY_OSL_PATH_3DSMAX2013_X64 = C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\opensl
USERNAME = ggreenwalt
LOGONSERVER = \SFS-FILE
MAGICK_CONFIGURE_PATH = \sfs-file\deadlinerepository6\draft\Windows\x64
SESSIONNAME = Console
PROGRAMDATA = C:\ProgramData
VRAY30_RT_FOR_3DSMAX2013_PLUGINS_X64 = C:\Program Files\Chaos Group\V-Ray\RT for 3ds Max 2014 for x64/bin/plugins
CLASSPATH = .;C:\Program Files (x86)\Java\jre7\lib\ext\QTJava.zip
TCL_LIBRARY = C:\Python27\tcl\tcl8.5
PATH = C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Common Files\Autodesk Shared;C:\Program Files (x86)\Autodesk\Backburner;C:\Program Files (x86)\QuickTime\QTSystem
USERDNSDOMAIN = STRAIGHTFACEHQ.COM
CM2014DIR = C:\Program Files (x86)\Common Files\Autodesk Shared\Materials
PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
ADSK_3DSMAX_X64_2014 = C:\Program Files\Autodesk\3ds Max 2014
FP_NO_HOST_CHECK = NO
WINDIR = C:\WINDOWS
DEADLINE_PATH = C:\Program Files\Thinkbox\Deadline6\bin
APPDATA = C:\Users\ggreenwalt\AppData\Roaming
HOMEDRIVE = C:
SYSTEMDRIVE = C:
NUMBER_OF_PROCESSORS = 12
PROCESSOR_LEVEL = 6
ILBDIR = C:\Program Files (x86)\Common Files\Autodesk Shared\Materials
COMMONPROGRAMW6432 = C:\Program Files\Common Files
OS = Windows_NT
PUBLIC = C:\Users\Public
QTJAVA = C:\Program Files (x86)\Java\jre7\lib\ext\QTJava.zip

imp.find_module = *** “imp.find_module( “Draft” )” failed***

*** “import Draft” failed ***[/code]

This output shows that you’re still using Python 2.7, not Python 2.6. If your PATH environment variable has the directory for Python 2.7 (either exclusively, or before Python 2.6), or does not include the path to Python 2.6 (this appears to be the case for you), you will need to type the path for python 2.6 to run the correct version:[code]

c:\Python26\python.exe
[/code] or: C:\Program Files\Thinkbox\Deadline6\bin\dpython.exe
If you are using Draft outside of Deadline, you will also need to let Python know where to find the draft module. This can be done by adding the location of Draft to your PYTHONPATH environment variable, which, in your case, appears to be: \\sfs-file\deadlinerepository6\draft\Windows\x64 (alternately you can add that directory to sys.path before attempting to import Draft.)

Oh, sorry I thought you meant there might be a way to get it to work with 2.7. Switching to 2.6 seems to work, which is to say I now get a license error, but that’s easy to follow up on.

Ah. No… not (yet?) compatible with 2.7.

Regarding Python 2.6 vs 2.7: we need to be compatible with Deadline, which uses Python 2.6.

Privacy | Site terms | Cookie preferences