Closed JamiePhonic closed 1 month ago
Okay, so i cloned the repo and took a crack at debugging it myself. It took most of the day but i think the issue is in display.py and might be related to this on line 174:
pixmap = self.image.load()
It seems that self.image
has a resolution of 128x32. I assume that since my display is bigger than that, it's causing the "image index out of range" exception as it tries to index outside of that range (in my case, 160x128)
I can see self.image
being instantiated on line 115:
self.image = Image.new("1", (width, 32))
I noticed the comment specifying that "Height can only be 32". Is there a specific reason for that?
I added self.logger.debug("Called _render_display with resolution %s x %s", self.width, self.height)
directly above def pack()
(plus the required supporting code) and it outputs Called _render_display with resolution 160 x 128
which would suggest the player is correctly reporting its display resolution?
Unfortunatley i don't really know how i'd go about trying to fix this but i'm willing to give it a shot
Fixed by #364
I appear to have encountered an issue attempting to play media to a Squeezelite-ESP32 device with a display attached which causes both Home Assistant (through the SlimProto integration) and MusicAssistant (Through its own SlimProto provider) to throw an
IndexError: image index out of range
exceptionIn Home Assistant this causes the media playback to fail entierly. In Music Assistant, (Assuming "Enable Display Support" is enabled in the advanced settings of the player configuration) the media will still play, but the device volume will consistently reset to 20%. Also, if a Visualiser is enabled, this displays correctly.
The display i'm currently using is a 160x128 Adafruit ST7735 TFT, though i have ordered a Waveshare ST7789 2" 240×320 display to try to rule out the issue being the current display simply being too small.
The Exception trace from Home Assistant is below. I have had a skim though the code in
display.py
and can't immediatley see anything that jumps out as a potential culprit but sadly i dont think i'm familiar enough with Python to be able to debug this myself.