Page 1 of 1

Intermittent error: "STUFF" ...

Posted: 2019-03-07T16:26:28-07:00
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?

Re: Intermittent error: "STUFF" ...

Posted: 2019-03-07T17:09:54-07:00
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?

Re: Intermittent error: "STUFF" ...

Posted: 2019-03-07T18:17:30-07:00
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)?

Re: Intermittent error: "STUFF" ...

Posted: 2019-03-07T19:58:06-07:00
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.

Re: Intermittent error: "STUFF" ...

Posted: 2019-03-08T02:02:45-07:00
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.

Re: Intermittent error: "STUFF" ...

Posted: 2019-03-08T06:22:29-07:00
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.