django-cms / django-filer

File and Image Management Application for django
https://django-filer.readthedocs.io/
Other
1.73k stars 574 forks source link

Crash in filer when creating icons when the image doesn't exists #1379

Closed vinitkumar closed 11 months ago

vinitkumar commented 12 months ago

File "/usr/local/lib/python3.9/site-packages/django/contrib/admin/sites.py", line 232, in inner
    return view(request, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/filer/admin/fileadmin.py", line 179, in icon_view
    thumbnail = thumbnailer.get_thumbnail(thumbnail_options, generate=True)
  File "/usr/local/lib/python3.9/site-packages/easy_thumbnails/files.py", line 508, in get_thumbnail
    thumbnail = self.generate_thumbnail(
  File "/usr/local/lib/python3.9/site-packages/easy_thumbnails/files.py", line 387, in generate_thumbnail
    raise exceptions.InvalidImageFormatError(msg.format(name=self.name))

Exception Type: InvalidImageFormatError at /admin/filer/image/icon/4/40
Exception Value: The source file does not appear to be an image: 'filer_public/83/6c/836cd182-d2ff-44d9-aa89-033f051179f7/header.jpg'

It is introduced in the recent code changes done in Filer 3.0.0