Page 1 of 1

convert: missing an image filename

Posted: 2009-08-01T08:49:24-07:00
by Martje
Hey!

In Python I execute the following code:

Code: Select all

dir = '/home/martijn/Documenten/Eclipse/ponycluboosterwolde/media/afbeeldingen/header/rectangles/'
commands.getstatusoutput('convert -background none %srect_temp.svg %srect_%s.png' % (dir, dir, kleur[1:]))
The following code gets executed on the system:

Code: Select all

convert -background none /home/martijn/Documenten/Eclipse/ponycluboosterwolde/media/afbeeldingen/header/rectangles/rect_temp.svg /home/martijn/Documenten/Eclipse/ponycluboosterwolde/media/afbeeldingen/header/rectangles/rect_39cc00.png
.

/home/mar......./rect_temp.svg exists, the last one (the png) does not. When I run the Python code, ImageMagick reports the following:

Code: Select all

Exit code:256
Message:"convert: missing an image filename `/home/martijn/Documenten/Eclipse/ponycluboosterwolde/media/afbeeldingen/header/rectangles/rect_39cc00.png' @ wand/convert.c/ConvertImageCommand/2710."
However, when I run the code from my terminal, everything goes fine! What's going on? :(

Re: convert: missing an image filename

Posted: 2009-08-01T09:04:01-07:00
by fmw42
you may have to provide the full path to convert in your API call.

Re: convert: missing an image filename

Posted: 2009-08-01T09:08:00-07:00
by Martje
Thanks for your suggestion. It doesn't help unfortunately :(.

Re: convert: missing an image filename

Posted: 2009-08-01T12:35:03-07:00
by Martje
It seems some security service is standing in the way :). I suspect AppArmor, but it could be SELinux also.

Problem solved! :)