Ticket #11608 (confirmed Bug)

Opened 5 years ago

Last modified 3 years ago

Adding truncated image raises IOError

Reported by: regisrouet Owned by:
Priority: minor Milestone: 4.x
Component: Archetypes Version: 4.0
Keywords: image, IOError Cc:

Description (last modified by kleist) (diff)

Trying to affect a truncated gif image to the image field of a news event raises IOError.

This can be annoying for mass/batch editing, like with transmogrifier.

I guess the error should be handled gracefully with a WARNING or INFO message in Archetypes.Field ? Or images should be tested before being added ?

Here the trace with transmogrifier and Plone 4.0.4 :

  ...
  Module plone.app.transmogrifier.atschemaupdater, line 62, in __iter__
  Module Products.Archetypes.Field, line 2320, in set
  Module plone.app.imaging.monkey, line 39, in createScales
  Module plone.app.imaging.traverse, line 73, in createScale
  Module Products.Archetypes.Field, line 2487, in scale
  Module PIL.Image, line 679, in convert
  Module PIL.ImageFile, line 201, in load
IOError: image file is truncated (156 bytes not processed)
> /usr/lib/python2.6/dist-packages/PIL/ImageFile.py(201)load()
-> raise IOError("image file is truncated (%d bytes not processed)" % len(b))

Attachments

arton1090.gif Download (32.9 KB) - added by regisrouet 5 years ago.
exemple truncated gif image

Change History

Changed 5 years ago by regisrouet

exemple truncated gif image

comment:1 Changed 5 years ago by kleist

  • Description modified (diff)

added curly brackets round traceback

comment:2 Changed 4 years ago by kleist

  • Keywords image, added; image removed
  • Status changed from new to confirmed
  • Version set to 4.0

comment:3 Changed 3 years ago by kleist

see also #10667

Note: See TracTickets for help on using tickets.