Division by zero on Ubuntu 22.04
joagre opened this issue · 4 comments
Describe the bug
I followed the installation instructions for Ubuntu (22.04) and installed all required packages but when I start the streamdeck app I get a division by zero error.
To Reproduce
Start the streamdeck app.
I see this:
jocke@eve:~$ streamdeck
qt.dbus.integration: Could not connect "org.freedesktop.IBus" to globalEngineChanged(QString)
Exception in thread Thread-3 (_run):
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/jocke/.local/lib/python3.10/site-packages/streamdeck_ui/display/display_grid.py", line 165, in _run
image = PILHelper.to_native_format(self.streamdeck, image)
File "/home/jocke/.local/lib/python3.10/site-packages/StreamDeck/ImageHelpers/PILHelper.py", line 103, in to_native_format
image.thumbnail(image_format['size'])
File "/home/jocke/.local/lib/python3.10/site-packages/PIL/Image.py", line 2603, in thumbnail
size = preserve_aspect_ratio()
File "/home/jocke/.local/lib/python3.10/site-packages/PIL/Image.py", line 2593, in preserve_aspect_ratio
if x / y >= aspect:
ZeroDivisionError: division by zero
lsusb says this:
jocke@eve:~$ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 05e3:0749 Genesys Logic, Inc. SD Card Reader and Writer
Bus 001 Device 005: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 001 Device 004: ID 0489:e0a2 Foxconn / Hon Hai
Bus 001 Device 003: ID 0c45:6723 Microdia Integrated_Webcam_HD
Bus 001 Device 007: ID 0fd9:0086 Elgato Systems GmbH Stream Deck Pedal
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
The UI actually starts but it's catatonic, but when I hit a pedal I see output in the terminal window though:
Traceback (most recent call last):
File "/home/jocke/.local/lib/python3.10/site-packages/streamdeck_ui/gui.py", line 156, in handle_keypress
if api.reset_dimmer(deck_id):
File "/home/jocke/.local/lib/python3.10/site-packages/streamdeck_ui/api.py", line 93, in reset_dimmer
self.dimmers[serial_number].brightness = self.get_brightness(serial_number)
KeyError: 'FL28L1A02196'
Expected behavior
The UI should start without an error.
Screenshots
Operating system (please complete the following information)
- OS: Ubuntu 22.04
- Desktop environment: Gnome (X11)
- Python version: Python 3.10.7
Stream Deck Version
- Pedal
This seems to be related to #227 where it crashes because there isn't an image for the Pedal configuration.
A fix has been added in 5ca56ae. I can't test it with an actual pedal, but once this is released, please check if it works.
Closing for now - please reopen if this issue is not fixed in 2.0.16 or later
Sorry if this reopens the issue, but since 2.0.16 is not released yet, is there any way for those of us with pedals to test this fix?