On a new installation of sigal running over O(10**5) pictures, have encountered a situation where after the hours of processing, sigal aborts with an uncaught exception. I'm afraid I no longer have the exact report (sorry!), but it related to this part of gallery.py (the def thumbnail(self) method):
expression was being evaluated. Python complained about a str not being addable to a NoneType. It appears as though f.thumbnail was None. The exception was not caught at any higher point in the call stack so the whole sigal process aborted at this point, every time. Ouch.
Adding these two little lines immediately before the statement
if not f.thumbnail:
cured the problem here.
The text was updated successfully, but these errors were encountered:
Yup, it's just that rerunning sigal on this dataset takes multiple hours. Will give it a try in a scratch output tree. BTW I didn't know there is a debug log -- the sigal build -d option isn't obviously documented e.g. in sigal --help.
With sigal build -d, I am unable to reproduce the problem because even minor problems result in exceptions, so the code stops before the original failure point.
With sigal build -v, I am now unable to reproduce the problem, perhaps because of changes to the source image directories between then and now (and no way to roll back to exactly that state).
I'm sorry I don't have enough information here. But as a philosophical matter, would it be good to have e.g. a systematic exception try/except wrapper around all logic that deals with input, so that the gallery generation will go on even if something is wrong with an item of media or an album?
I agree about avoiding crashes in normal mode, but catching blindly exceptions can also hide other problems so it would be easier if I could reproduce. Anyway, I added the try/except so it should be good now.