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
Silently fails to process gallery images #551
Comments
I diagnosed this. If Pillow if being used then you get the silent failures. If (Ubuntu 13.04) python-imaging is installed then it works fine. |
That sounds like a Pillow setup failure or a Pillow bug. Nikola supports both PIL and Pillow but suggests Pillow because it's python 3 compatible and works on virtualenv. |
The big problem is the silent part. Perhaps add some code after the processing to verify the output file actually exists and is not zero length? |
Yep. Adding it to my task list. |
I can definitely confirm this again with 5.5.1 on two different machines. pip install --upgrade to get 5.5.1 resulted in Pillow being installed even though python-imaging is installed. And then the galleries break. It looks like this will affect everyone running Ubuntu 13.04 (no idea about other versions) |
On 09/08/13 01:56, Roger Binns wrote:
Can you mail me privately one of the imaegs that fail? |
I am now reproducing this. I am cleaning up the gallery plugin as part of creating the new galleries, so I should get a fix there. |
I have tested this with the image provided by @rogerbinns and it works so, not able to reproduce it yet. There was one place where things could fail silently: the thumbnailing code. In those cases where it failed, it would save the original-size image to the thumbnail. I am now adding a warning there. The only other exception catching in place is EXIF reading, which is ignored because it can still work. Other than that, I can't see any place in the gallery code where things fail silently at all. I am keeping this open but at this point I can't do much |
No longer silent with 6.0.1
|
Interesting, that means it has not generated the thumbnail, which means it may be a task ordering issue. What does this do?
If that succeeds, does the error when doing |
It isn't a task ordering issue - it is a PIL/Pillow issue. If I use the python-imaging module that is standard with Ubuntu 13.04 then everything works fine. If I let pip install pillow ( I deleted output/galleries and then did:
Note the last dollar is my prompt due to lack of trailing newline in the WARNING. |
Ok, so it's a bug or two and I know how to hadle it now ;-)
|
The fix is 2 parts:
This should make the worse symptoms go away, except that your may get really really heavy thumbs in some cases if your PIL is broken. |
On my first machine, everything works perfectly. I have several galleries and they get processed fine.
On a second machine all the files in galleries are listed as being processed (render_galleries:output/galleries/ALBUM/filename) for the image as well as its thumbnail. However the output/galleries/ALBUM directories do not have most of the photos. Sometimes there are none (out of ~10) and in one 2 out 4. I can't see any pattern to why.
Some dependencies failed to build because zlib dev was not present, but I fixed that. Pillow says both JPEG and PNG (the two formats I use) have support available.
The text was updated successfully, but these errors were encountered: