Open benoit74 opened 3 months ago
From googling, it looks like that's an error message from the sharp
library.
Probably happening here?
Might just be a bad URL that's getting erroneously read as image data.
The proximate cause of the error is the fact that the URL:
https://encyclopediaofmath.org/common/spr_logo.gif
Does a 301 to https://encyclopediaofmath.org/wiki/Main_Page
Presumably, this "logo" link is somewhere in the initial metadata that mwoffliner gathers about the wiki. So the bug is that mwoffliner is hardcoded to download this as image data and doesn't consider 301 to be an error status. It then crashes early on in the scraping process.
If the folks putting in the request would like to fix their problem without waiting for mwoffliner, I would suggest putting an image (even a 1x1 PNG) at that URL.
Thank you!
Would specifying a custom favicon with --customZimFavicon
allow to bypass the code trying to download the "logo"?
Yes, I believe that would work
Here the solution is IMHO to test the format of the image at the same time (early) like other ZIM metadata.
Zimfarm recipe: https://farm.openzim.org/recipes/encyclopediaofmath.org_en_all
Zim-request details: https://github.com/openzim/zim-requests/issues/964#issuecomment-2124736481
Log:
It is pretty hard to tell which image has been grabbed and failed to be read, making the fix even more delicate.