I found that when playing music from Plex, the album art images were sometimes truncated and would cause OSError exceptions when resizing. Seems to be an upstream issue with the Sonos<>Plex integration.
This relies on a feature to allow truncated images in the pillow versions of PIL which the recommended python3-pil package seems to provide. This displays the incomplete images as provided by the Sonos API without crashing the script.
I found that when playing music from Plex, the album art images were sometimes truncated and would cause
OSError
exceptions when resizing. Seems to be an upstream issue with the Sonos<>Plex integration.This relies on a feature to allow truncated images in the
pillow
versions ofPIL
which the recommendedpython3-pil
package seems to provide. This displays the incomplete images as provided by the Sonos API without crashing the script.