trevorcampbell / website_diff

MIT License
2 stars 1 forks source link

PIL does not support svg files although these can be found in `<img>` tags #31

Closed joelostblom closed 1 month ago

joelostblom commented 1 month ago

Continuing to to making progress from #28, I now run into this issue:

PIL.UnidentifiedImageError: cannot identify image file '/home/joel/Downloads/diff-test/old/doc/_build/prerendered_old/_images/stocks_it-IT.svg'

I believe this stems from the fact that PIL does not support svg files, whereas they can be found in <img> tags in the HTML source. Guarding this section of the code behind if not src.split('.')[-1] == 'svg': works as a local workaround, but I realize you might want to do something fancier like converting the svgs to bitmaps so that you can show the diff.

joelostblom commented 1 month ago

I just realized @briank-git already reported this in https://github.com/trevorcampbell/website_diff/issues/30 so closing.