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
Invalid image kills thumbnail creation #134
Comments
Hi, |
Hi, I have an Ubuntu 14.04.1 LTS system, and sigal 0.9.1 was installed via Here's the log. When I try-excepted the offending
|
Hmm interesting, if I understand correctly your traceback, the exception is raised in https://github.com/saimn/sigal/blob/master/sigal/image.py#L155, but it should have failed a few lines before (https://github.com/saimn/sigal/blob/master/sigal/image.py#L149) and the exception would be catched in this case. |
Hi, Sure I can test this tonight when I get back home from work. |
Have you run with When I ran build with those flags in their default mode, processing went fine, apart from error messages when processing empty.jpg. The empty file was not created into the output directory.
It looks fine: processed some files, and notes that one file failed. But when P.s. I ran the tests on a virtualenv with git cloned sigal. |
Ah indeed, with these options the image is not read in |
Hi,
I was running
sigal build
and noticed that it died on thumbnail creation when the image file was not a valid image file. What had happened, was that the offending image was accidentally replaced with a text file, only the with the name of the original image file.The failure occurred in image.py's
generate_thumbnail
-function when it ran the lineimg = PILImage.open(source)
I think that a simple
try-except
around that area would be OK, no need for a fancy rollback, just log the offending file name, or something alone those lines.The text was updated successfully, but these errors were encountered: