Menu

#162 PIL Exceptions not captrued in thumbnail operation

0.50
closed
nobody
2013-06-03
2013-04-15
No

PIL errors are not captured by the thumbnailer, so that can result in the client seeing a 500 response when the server fails to create a thumbnail. It would be better to fallback to the unknown/error icon [if it exists in Project 7000].

ERROR:http:cannot identify image file
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/OpenGroupware-0.1.49rc34-py2.6.egg/coils/net/handler.py", line 163, in process_request
    getattr(handler, 'do_{0}'.format(self.command))()
  File "/usr/lib/python2.6/site-packages/OpenGroupware-0.1.49rc34-py2.6.egg/coils/protocol/thumb/document_thumb.py", line 98, in do_GET
   rfile = self.get_thumbnail( )
  File "/usr/lib/python2.6/site-packages/OpenGroupware-0.1.49rc34-py2.6.egg/coils/protocol/thumb/document_thumb.py", line 72, in get_thumbnail
    if thumber.create( ):
  File "/usr/lib/python2.6/site-packages/OpenGroupware-0.1.49rc34-py2.6.egg/coils/protocol/thumb/thumb_image.py", line 43, in create
    self.image = Image.open( rfile )
  File "/usr/lib64/python2.6/site-packages/PIL/Image.py", line 1980, in open
    raise IOError("cannot identify image file")
IOError: cannot identify image file
DEBUG:context:Closing context 22385b953104490cbd63f4074b27a90e

Discussion

  • Adam Tauno Williams

    • status: open --> closed
     
  • Adam Tauno Williams

    The thumbnailer was refactored to an event-exchange service; in the course of the refactor exceptions are handled properly.

     

Log in to post a comment.