saimn / sigal

yet another simple static gallery generator
http://sigal.saimon.org/
MIT License
894 stars 170 forks source link

KeyError: '.png' #495

Open davidenitti opened 1 year ago

davidenitti commented 1 year ago

I didn't manage to make sigal work, I have this error:

Collecting albums /Traceback (most recent call last):
  File "/home/davide/.local/bin/sigal", line 8, in <module>
    sys.exit(main())
  File "/home/davide/.local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/davide/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/davide/.local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/davide/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/davide/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/davide/.local/lib/python3.10/site-packages/sigal/__init__.py", line 173, in build
    gal = Gallery(settings, ncpu=ncpu, quiet=quiet)
  File "/home/davide/.local/lib/python3.10/site-packages/sigal/gallery.py", line 743, in __init__
    album = Album(relpath, settings, dirs, files, self)
  File "/home/davide/.local/lib/python3.10/site-packages/sigal/gallery.py", line 395, in __init__
    media = Image(f, self.path, settings)
  File "/home/davide/.local/lib/python3.10/site-packages/sigal/gallery.py", line 238, in __init__
    if imgformat and PILImage.EXTENSION[self.src_ext] != imgformat.upper():
KeyError: '.png'

it seems that it's not able to convert the PNG files, because if I comment this line it works img_format = "JPEG"