AWS Thinkbox Discussion Forums

ImportError: No module named Draft

Hi
I have this working on my laptop but it doesn’t seem to work on my workstation:

export PYTHONPATH="/Users/bonsak/Library/Application Support/Thinkbox/Deadline6/slave/Bondes/Draft"
export MAGICK_FONT_PATH="/Users/bonsak/Library/Application Support/Thinkbox/Deadline6/slave/Bondes/Draft"
export MAGICK_CONFIGURE_PATH="/Users/bonsak/Library/Application Support/Thinkbox/Deadline6/slave/Bondes/Draft"
cd "/Users/bonsak/Library/Application Support/Thinkbox/Deadline6/slave/Bonsak-work/Draft"
/Applications/Thinkbox/Deadline6/Resources/dpython
>>> import Draft
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named Draft

What am i missing? Any help appreciated.

Cheers
Bonsak

Is the Draft library actually in “/Users/bonsak/Library/Application Support/Thinkbox/Deadline6/slave/Bondes/Draft”, or in a subfolder of that?

I’m also attaching a script that will help us diagnose the problem if it’s not that… extract and run the script, and let me know what the output is.
draftTest.py.zip (516 Bytes)

Oops. Typo.
It was the path from my laptop :blush: But when i try to import Draft with the correct settings, it seem its looking for some of the libs in the Draft folder in the “usr/local/lib folder instead” Are the Draft libs supposed to be installed there as well?:

[code]

import Draft
Traceback (most recent call last):
File “”, line 1, in
ImportError: dlopen(/Users/bonsak/Library/Application Support/Thinkbox/Deadline6/slave/Bonsak-work/Draft/Draft.so, 2): Library not loaded: /usr/local/lib/libavcodec.54.dylib
Referenced from: /Users/bonsak/Library/Application Support/Thinkbox/Deadline6/slave/Bonsak-work/Draft/Draft.so
Reason: image not found[/code]

Cheers
Bonsak

No, they shouldn’t be there, but if you have some (but not all) of the files there, it’ll mess things up. Is this system Mac or Linux?

Mac. Can’t find any of the Draft libs in there though.

"/usr/local/lib" drwxr-xr-x 3 24561 wheel 102B Sep 4 20:02 dtrace lrwxr-xr-x 1 bonsak admin 29B Nov 5 15:45 gcc -> ../Cellar/gcc46/4.6.4/lib/gcc lrwxr-xr-x 1 bonsak admin 52B Nov 5 15:45 libgpg-error.0.dylib -> ../Cellar/libgpg-error/1.12/lib/libgpg-error.0.dylib lrwxr-xr-x 1 bonsak admin 50B Nov 5 15:45 libgpg-error.dylib -> ../Cellar/libgpg-error/1.12/lib/libgpg-error.dylib lrwxr-xr-x 1 bonsak admin 43B Nov 5 15:46 libksba.8.dylib -> ../Cellar/libksba/1.3.0/lib/libksba.8.dylib lrwxr-xr-x 1 bonsak admin 41B Nov 5 15:46 libksba.dylib -> ../Cellar/libksba/1.3.0/lib/libksba.dylib lrwxr-xr-x 1 bonsak admin 43B Nov 5 15:26 libltdl.7.dylib -> ../Cellar/libtool/2.4.2/lib/libltdl.7.dylib lrwxr-xr-x 1 bonsak admin 37B Nov 5 15:26 libltdl.a -> ../Cellar/libtool/2.4.2/lib/libltdl.a lrwxr-xr-x 1 bonsak admin 41B Nov 5 15:26 libltdl.dylib -> ../Cellar/libtool/2.4.2/lib/libltdl.dylib lrwxr-xr-x 1 bonsak admin 45B Nov 5 15:45 libyaml-0.2.dylib -> ../Cellar/libyaml/0.1.4/lib/libyaml-0.2.dylib lrwxr-xr-x 1 bonsak admin 37B Nov 5 15:45 libyaml.a -> ../Cellar/libyaml/0.1.4/lib/libyaml.a lrwxr-xr-x 1 bonsak admin 41B Nov 5 15:45 libyaml.dylib -> ../Cellar/libyaml/0.1.4/lib/libyaml.dylib drwxr-xr-x 5 24561 wheel 170B Oct 31 09:12 node_modules drwxr-xr-x 3 bonsak admin 102B Nov 5 15:45 pkgconfig drwxr-xr-x 3 bonsak admin 102B Oct 29 17:15 python2.7 lrwxr-xr-x 1 bonsak admin 32B Nov 5 15:45 x86_64 -> ../Cellar/gcc46/4.6.4/lib/x86_64

Cheers
Bonsak

In that test script I asked you to run, what is the output of this line:

print "\nimp.find_module =", imp.find_module( "Draft" )

Talking to Jon, you might also need to set your DYLD_LIBRARY_PATH. (Did you do a normal install, or are you trying to run from copied files?)

Normal install

imp.find_module = (<open file '/Volumes/DeadlineRepository6/draft/Mac/Draft.so', mode 'rb' at 0x100278150>, '/Volumes/DeadlineRepository6/draft/Mac/Draft.so', ('.so', 'rb', 3))

My DYLD_LIBRARY_PATH is currently

DYLD_LIBRARY_PATH = :/Applications/ChaosGroup/V-Ray/Standalone_for_snow_leopard_x64/lib/snow_leopard_x64/gcc-4.2

Adding the Draft path to DYLD_LIBRARY_PATH solves the problem!

Thanks
Bonsak

Cool, glad that worked!

Privacy | Site terms | Cookie preferences