Exception thrown by
self.internal_size = map(int, self.exif['ImageSize'].split('x')) in imagemagick.py
Example affected file: https://commons.wikimedia.org/wiki/File:Tree_edges.svg
Exception thrown by
self.internal_size = map(int, self.exif['ImageSize'].split('x')) in imagemagick.py
Example affected file: https://commons.wikimedia.org/wiki/File:Tree_edges.svg
| Subject | Author | Repo | Branch | Lines +/- | |
|---|---|---|---|---|---|
| Upgrade to 1.12 | Gilles | operations/debs/python-thumbor-wikimedia | master | +228 -4 |
| rTHMBREXT Thumbor Plugins | |||
| rTHMBREXT3d0030df230f Version bump | |||
| Restricted Differential Revision | rTHMBREXTbf52dbeba4a7 Allow SVGs starting with a UTF-8 BOM | ||
Turns out that this file starts with some invisible characters before the <?xml, which makes it fall back to the default attempt of rendering through the imagemagick engine - not knowing what kind of file we're dealing with - and that in turns fails in this particular way (but would fail later by being unable to convert the image anyway).
The invisible characters are simply UTF-8 encoded BOM. Which means that this might be a valid file still and that's the issue to solve. It's probably a good idea to skip the BOM in general, for all file types.
Change 409314 had a related patch set uploaded (by Gilles; owner: Gilles):
[operations/debs/python-thumbor-wikimedia@master] Upgrade to 1.12
Change 409314 merged by Filippo Giunchedi:
[operations/debs/python-thumbor-wikimedia@master] Upgrade to 1.12
Mentioned in SAL (#wikimedia-operations) [2018-02-12T15:00:58Z] <godog> roll-upgrade thumbor to 1.12 - T186500 T186594 T186492