timothycrosley / streamdeck-ui

A Linux compatible UI for the Elgato Stream Deck.
https://timothycrosley.github.io/streamdeck-ui/
MIT License
1.13k stars 241 forks source link

UI unable to detect device after device set to non existent page. #267

Open Shimo opened 1 year ago

Shimo commented 1 year ago

I was experimenting and manually setting page configurations in the json file. And after setting the default page to 10 (So 11 for humans) it got stuck. Removal of streamdeck-ui and readding has not resolved the issue. Below is the error received when running from terminal.

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 "/usr/lib/python3.10/site-packages/streamdeck_ui/display/display_grid.py", line 116, in _run
    page = self.pages[self.current_page]
KeyError: 11
Shimo commented 1 year ago

Probably not the smartest way to fix this issue. But I was able to get it unstuck by editing line 116 of /usr/lib/python3.10/site-packages/streamdeck_ui/display/display_grid.py to page = self.pages[2] This hard set the page to one I knew was safe, then when I launched the app it let me import a config. Quit and changed the line back to what it was before. page = self.pages[self.current_page]

I wasn't able to figure out where it actually stored the last runs config that it was loading causing the issue. But hey. This worked. I imagine the patch that has been mentioned to prevent lockups when an error is encountered my fix this one too.

coolapso commented 1 year ago

hi, this project seems to be stale and a new fork as been made with the intention of replacing this one.

if this still an issue please reopen it at: https://github.com/streamdeck-linux-gui/streamdeck-linux-gui