Intermittent error: "STUFF" ...

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
squiddy
Posts: 20
Joined: 2018-09-27T02:53:52-07:00
Authentication code: 1152

Intermittent error: "STUFF" ...

Post by squiddy »

Version: ImageMagick 6.9.10-14 Q16 i686 2018-11-10
Features: Cipher DPC OpenMP
Delegates (built-in): bzlib fontconfig freetype jbig jng jpeg lcms lqr lzma pangocairo png tiff wmf x xml zlib
Linux 32bit, 4GB RAM.

I get this error intermittently. Can't reproduce it to order.
"convert: no decode delegate for this image format `STUFF' @ error/constitute.c/ReadImage/560"

It's from the following IM command, run shelled out from a Python script.

Code: Select all

convert input_file  -colors 256 -unique-colors -scale 1000% -crop 180x10 -append -bordercolor 'gray(92%)' -border 1 -flip -flop output_file

(I pretty much robbed it wholesale from another post on the forum)

The word "STUFF" doesn't appear anywhere in my Python code; and so far as I can tell from a grep, nor does it appear in the IM source code for this version.

Bit of a mystery, then.

Any help anyone?

User avatar
fmw42
Posts: 26269
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Intermittent error: "STUFF" ...

Post by fmw42 »

Does it appear in the file name or path to the file? What happens afterwards? Does it create an output? Can you find the file it is failing on and if you run it again does it fail? Do you have enough space in your /tmp file or whatever file is being used by MAGICK_TEMPORARY_PATH?

snibgo
Posts: 12906
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Intermittent error: "STUFF" ...

Post by snibgo »

squiddy wrote:convert input_file -colors 256 -unique-colors -scale 1000% -crop 180x10 -append -bordercolor 'gray(92%)' -border 1 -flip -flop output_file
The command has no extension on the output file. How does IM know what format you want (PNG, TIFF etc)?
snibgo's IM pages: im.snibgo.com

User avatar
fmw42
Posts: 26269
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Intermittent error: "STUFF" ...

Post by fmw42 »

The command has no extension on the output file. How does IM know what format you want (PNG, TIFF etc)?
I think his input and output names are just placeholders.

squiddy
Posts: 20
Joined: 2018-09-27T02:53:52-07:00
Authentication code: 1152

Re: Intermittent error: "STUFF" ...

Post by squiddy »

fmw42 wrote:
2019-03-07T17:09:54-07:00
Does it appear in the file name or path to the file? What happens afterwards? Does it create an output? Can you find the file it is failing on and if you run it again does it fail? Do you have enough space in your /tmp file or whatever file is being used by MAGICK_TEMPORARY_PATH?
in order:
No, it appears nowhere.
Nothing happens...
No output file is created.
Yes I can find the file.
No if I run again it doesn't fail
There's plenty of space in /tmp and MAGICK_TEMPORARY_PATH isn't set.

This is a Python script that runs once daily (as a cron job), and about 3 out of 30-odd times it's failed in the same way.

And, @snibgo, fred's answer to your post is correct; input_file and output_file are just placeholders for the post here.

The real code looks like this, and the variables passed for string interpolation are full pathname+filename+extension, eg '/something/else/palette.png'

Code: Select all

call(
        f"convert {upload_list[0]} -colors 256 -unique-colors -scale 1000% -crop 180x10 "
        f"-append -bordercolor 'gray(92%)' -border 1 -flip -flop {palette_file}",
        shell=True,
    )
   
The var passed as the input file is sometimes a jpg, sometimes a png, neither ever over about 300k and usually smaller, also fully qualified. The input files have been generated by IM too, but prior to this script ever running.

I don't like shelling like this because I think it's open to odd cacheing or flushing issues, and this might be one of them, but what's peculiar is this "STUFF" message.

I'll tack on some debuggery & logging and see if I can catch some more useful information when (or if) it next occurs.

snibgo
Posts: 12906
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Intermittent error: "STUFF" ...

Post by snibgo »

squiddy wrote:And, @snibgo, fred's answer to your post is correct; input_file and output_file are just placeholders for the post here.
I suspected that. So you didn't post (and don't know) the actual command given.
For example, if a filename ends with ".stuff", you would get that error.
snibgo's IM pages: im.snibgo.com

Post Reply