Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
vinitkumar opened this issue Jul 9, 2023 · 0 comments · Fixed by #1384 or #1389
Closed

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

vinitkumar opened this issue Jul 9, 2023 · 0 comments · Fixed by #1384 or #1389
Assignees

Comments

@vinitkumar
Copy link
Member

vinitkumar commented Jul 9, 2023

  
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

@vinitkumar vinitkumar self-assigned this Jul 9, 2023
vinitkumar added a commit to SocialSchools/django-filer that referenced this issue Jul 9, 2023
Thumbnail generation can fail when the image is not present or moved or
if we have a reference in database but no image in storage.

- Github Issue: Fixes  django-cms#1379

Authored-by: Vinit Kumar <[email protected]>
Signed-off-by: Vinit Kumar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment