librelist archives

« back to archive

Re: problem running example code.

Re: problem running example code.

From:
Mike Chung
Date:
2012-12-10 @ 08:57






Traceback (most recent call last):  File "image-chopping.py", line 1, in 
<module>    from wand.image import Image  File 
"/Library/Python/2.7/site-packages/wand/image.py", line 19, in <module>
from .api import MagickPixelPacket, libc, libmagick, library  File 
"/Library/Python/2.7/site-packages/wand/api.py", line 286, in <module>    
raise ImportError('MagickWand shared library not found or 
incompatible')ImportError: MagickWand shared library not found or 
incompatible

I installed pypy 1.9.0 using port i installed imagemagick using porti 
installed wand using pip.
I donno whats going on should this not work out of the box? anyone run 
into this issue ?  		 	   		   		 	   		  

Re: [wand] RE: problem running example code.

From:
Hong Minhee
Date:
2012-12-10 @ 09:33
You probably need to set MAGICK_HOME environment variable.
On Dec 10, 2012 5:57 PM, "Mike Chung" <mike_n_chung@hotmail.com> wrote:

>
>
>  Traceback (most recent call last):
>   File "image-chopping.py", line 1, in <module>
>     from wand.image import Image
>   File "/Library/Python/2.7/site-packages/wand/image.py", line 19, in
> <module>
>     from .api import MagickPixelPacket, libc, libmagick, library
>   File "/Library/Python/2.7/site-packages/wand/api.py", line 286, in
> <module>
>     raise ImportError('MagickWand shared library not found or
> incompatible')
> ImportError: MagickWand shared library not found or incompatible
>
>
> I installed pypy 1.9.0 using port
> i installed imagemagick using port
> i installed wand using pip.
>
> I donno whats going on should this not work out of the box? anyone run
> into this issue ?
>

Re: [wand] RE: problem running example code.

From:
Mike Chung
Date:
2012-12-10 @ 09:45

Thanks it worked!
Date: Mon, 10 Dec 2012 18:33:55 +0900
From: minhee@dahlia.kr
Subject: Re: [wand] RE: problem running example code.
To: wand@librelist.com

You probably need to set MAGICK_HOME environment variable.
On Dec 10, 2012 5:57 PM, "Mike Chung" <mike_n_chung@hotmail.com> wrote:











Traceback (most recent call last):  File "image-chopping.py", line 1, in 
<module>    from wand.image import Image  File 
"/Library/Python/2.7/site-packages/wand/image.py", line 19, in <module>
    from .api import MagickPixelPacket, libc, libmagick, library  File 
"/Library/Python/2.7/site-packages/wand/api.py", line 286, in <module>    
raise ImportError('MagickWand shared library not found or incompatible')
ImportError: MagickWand shared library not found or incompatible

I installed pypy 1.9.0 using port i installed imagemagick using porti 
installed wand using pip.

I donno whats going on should this not work out of the box? anyone run 
into this issue ?  		 	   		   		 	   		  
 		 	   		  

Re: [wand] RE: problem running example code.

From:
Mike Chung
Date:
2012-12-11 @ 08:30
Has anyone had this error before I did a google search and the stack 
overflow answer did not apply to me.since I call this in a part of the 
code that contains just the image and nothing else.
def Test():    with Image(filename="Dead.jpg") as img:        
img.alpha_channel(True)Test()


img.alpha_channel(True)TypeError: 'long' object is not callable
I am using version 0.30  		 	   		   		 	   		  
 		 	   		   		 	   		  

Re: [wand] RE: problem running example code.

From:
Hong Minhee
Date:
2012-12-11 @ 14:30
Image.alpha_channel [1] isn’t a method but a property, so change the code 
to like this:  

  img.alpha_channel = True

[1] http://dahlia.kr/wand/wand/image.html#wand.image.Image.alpha_channel  


On Tuesday, December 11, 2012 at 5:30 PM, Mike Chung wrote:

> > Has anyone had this error before I did a google search and the stack 
overflow answer did not apply to me.
> > since I call this in a part of the code that contains just the image 
and nothing else.
> >  
> > def Test():
> >     with Image(filename="Dead.jpg") as img:
> >         img.alpha_channel(True)
> > Test()
> >  
> >  
> >  
> >  
> > img.alpha_channel(True)
> > TypeError: 'long' object is not callable
> >  
> > I am using version 0.30