WebFaction
Community site: login faq

In one of my projects I'm doing

from wand.image import Image

Although the Webfaction docs state that ImageMagick is pre-installed on all servers, there seems to be a problem.

I had a very similar error on my OSX machine. It turned out that I only had

/usr/local/lib/libMagickWand-Q16.7.dylib

but somehow the wand API expects /usr/local/lib/libMagickWand.dylib

Simply placing a symlink in /usr/local/lib solved the issue.

Now on the Webfaction server there is nothing about libMagickWand in /usr/local/lib

Question 1: Where are the ImageMagick related libraries actually installed?

I tried to install ImageMagick from source and that seems to work nicely. In my wsgi.py (It's a Django project) I'm adding $HOME/lib to the LD_LIBRARY_PATH environment variable, but I'm still getting the same error. This just as a hint, I'm already trying to run my own ImageMagick, so if you have a solution that would help me on that path that would be great as well - but actually I would prefer to use the pre-installed ImageMagick.

Question 2 (optional): How could I get it to work with my custom ImageMagick installation?

EDIT1:

After some debugging I found out that this is the exact Exception that occurs:

AttributeError: '/usr/lib64/libMagickWand.so.2: undefined symbol: DrawSetTextInterlineSpacing'

at $HOME/Envs/kaplan/lib/python2.7/site-packages/wand/api.py(613)

So that should answer Question 1, now the question is, why it is able to load many many symbols but not this one...

asked 07 Jul '13, 19:49

mbrochh
861510
accept rate: 16%

edited 07 Jul '13, 20:03


Not really a good solution, but a work around:

The line that causes the error has been introduced after wand==0.2.4 (see https://github.com/dahlia/wand/compare/0.2.4...master#L75L322), so by simply fixing wand to that version in my requirements.txt file I could get my site back up and running.

So I assume that the ImageMagick version that is installed on Webfaction servers is too old and the Python Wand wrapper assumes a newer version of MagickWand?

permanent link

answered 07 Jul '13, 20:24

mbrochh
861510
accept rate: 16%

edited 07 Jul '13, 20:25

Version conflict sounds like a very likely cause based on this info. You would have to build the packages and dependencies from source code if you wanted to use a different version than what is provided.

(07 Jul '13, 22:20) johns
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×11
×1

question asked: 07 Jul '13, 19:49

question was seen: 7,347 times

last updated: 07 Jul '13, 22:21

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM