Page MenuHomePhabricator

18KOZ.pdf cannot be rendered: error: 'Warning: Skipped unknown 111 byte header
Closed, DuplicatePublic

Description

Rendering the PDF previews for https://test.wikipedia.org/wiki/File:18KOZ.pdf fails with (ExiftoolRunner) error: 'Warning: Skipped unknown 111 byte header and (ImagesHandler) Exception during _load_results, the latter having the trace

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/wikimedia_thumbor/handler/images/images.py", line 577, in _load_results
    results, content_type = BaseHandler._load_results(self, context)
  File "/usr/lib/python2.7/dist-packages/thumbor/handlers/__init__.py", line 334, in _load_results
    results = context.request.engine.read(image_extension, quality)
  File "/usr/lib/python2.7/dist-packages/wikimedia_thumbor/engine/proxy/proxy.py", line 133, in read
    ret = self.__getattr__('read')(extension, quality)
  File "/usr/lib/python2.7/dist-packages/wikimedia_thumbor/engine/__init__.py", line 40, in read
    return super(BaseWikimediaEngine, self).read(extension, quality)
  File "/usr/lib/python2.7/dist-packages/wikimedia_thumbor/engine/imagemagick/imagemagick.py", line 323, in read
    raise ImageMagickException('Failed to convert image %s' % stderr)  # pragma: no cover
ImageMagickException: Failed to convert image convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/504.
convert: no images defined `jpg:-' @ error/convert.c/ConvertImageCommand/3258.

Event Timeline

Tgr created this task.Apr 26 2020, 1:27 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 26 2020, 1:27 PM
Aklapper renamed this task from 18KOZ.pdf cannot be rendered to 18KOZ.pdf cannot be rendered: error: 'Warning: Skipped unknown 111 byte header.Apr 26 2020, 3:42 PM
Samat added a subscriber: Samat.Apr 26 2020, 8:54 PM

Same problem here (only with last two pages of the document):
https://wikimedia.hu/w/index.php?title=F%C3%A1jl:PK-542_2019.pdf&page=10

$ gs -sstdout=%stderr -sDEVICE=jpeg -dJPEG=90 -sOutputFile=%stdout -dFirstPage=1 -dLastPage=1 -r150 -dBATCH -dNOPAUSE -dSAFER -q -f 18KOZ.pdf > gstest.jpg
   **** Error: Form stream has unbalanced q/Q operators (too many q's)
               Output may be incorrect.
$ gs -sDEVICE=jpeg -dJPEG=90 -sOutputFile=%stdout -dFirstPage=1 -dLastPage=1 -r150 -dBATCH -dNOPAUSE -dSAFER -q -f 18KOZ.pdf > gstest2.jpg
$ head -50 gstest2.jpg | less
   **** Error: Form stream has unbalanced q/Q operators (too many q's)
               Output may be incorrect.
<FF><D8><FF><E0>^@^PJFIF^@^A^A^A^@<96>^@<96>^@^@<FF><E2>

Yup, this is T247473 again. Different non-fatal error, but same effect.