Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error - Streamdeck not launching - Fedora 37 #284

Closed
ILvCookies opened this issue Dec 21, 2022 · 14 comments
Closed

Error - Streamdeck not launching - Fedora 37 #284

ILvCookies opened this issue Dec 21, 2022 · 14 comments
Labels
bug Something isn't working

Comments

@ILvCookies
Copy link

Hi <('-'<), I have installed the streamdeck-ui successfully for Fedora 37. When trying to run it, the following error appears. I am not sure if this is a bug or just a bad configuration of my pc.

Command (without sudo):
streamdeck

Error:
Traceback (most recent call last):
File "/home/asuka/.local/bin/streamdeck", line 5, in
from streamdeck_ui.gui import start
File "/home/asuka/.local/lib/python3.11/site-packages/streamdeck_ui/gui.py", line 20, in
from streamdeck_ui import api
File "/home/asuka/.local/lib/python3.11/site-packages/streamdeck_ui/api.py", line 11, in
from pynput.keyboard import Controller, Key
File "/home/asuka/.local/lib/python3.11/site-packages/pynput/init.py", line 40, in
from . import keyboard
File "/home/asuka/.local/lib/python3.11/site-packages/pynput/keyboard/init.py", line 31, in
backend = backend(name)
^^^^^^^^^^^^^^^^^
File "/home/asuka/.local/lib/python3.11/site-packages/pynput/_util/init.py", line 76, in backend
raise ImportError('this platform is not supported: {}'.format(
ImportError: this platform is not supported: ('failed to acquire X connection: Can't connect to display ":0": b'Authorization required, but no authorization protocol specified\n'', DisplayConnectionError(':0', b'Authorization required, but no authorization protocol specified\n'))

Try one of the following resolutions:

  • Please make sure that you have an X server running, and that the DISPLAY environment variable is set correctly

Hope there is a fix, I love the project when I installed it on Fedora 36. ⸜(。˃ ᵕ ˂ )⸝
Thanks for the help. Regards.

@ILvCookies ILvCookies added the bug Something isn't working label Dec 21, 2022
@ILvCookies ILvCookies changed the title Error - Fedora 37 Error - Streamdeck not launching - Fedora 37 Dec 21, 2022
@katsadim
Copy link

Switching from wayland to Xorg did the trick for me.

@andersonid
Copy link

I am X11 user and still having problems to install and launch the streamdeck-ui .

Traceback (most recent call last):
File "/home/anobre/.local/bin/streamdeck", line 8, in
sys.exit(start())
^^^^^^^
File "/home/anobre/.local/lib/python3.11/site-packages/streamdeck_ui/gui.py", line 269, in start
build_device(ui)
File "/home/anobre/.local/lib/python3.11/site-packages/streamdeck_ui/gui.py", line 199, in build_device
build_buttons(ui, page)
File "/home/anobre/.local/lib/python3.11/site-packages/streamdeck_ui/gui.py", line 129, in build_buttons
deck = api.get_deck(deck_id)
^^^^^^^^^^^^^^^^^^^^^
File "/home/anobre/.local/lib/python3.11/site-packages/streamdeck_ui/api.py", line 133, in get_deck
return {"type": decks[deck_id].deck_type(), "layout": decks[deck_id].key_layout()}
~~~~~^^^^^^^^^
KeyError: None

@andersonid
Copy link

I got the streamdeck-ui working using pipenv with python3.8
Still need to fix for use with system default python version (3.11).

@bzeiss
Copy link

bzeiss commented Dec 30, 2022

I can confirm the KeyError: None issue for Fedora 37. Running Gnome on xorg.

@novahazard
Copy link

Is it a requirement to run xorg to get Streamdeck-ui to work on Fedora? It won't work on Wayland?

@pblanton
Copy link

pblanton commented Jan 3, 2023

How did you get it to install in the first place?

@novahazard
Copy link

I am having the same issue.

Traceback (most recent call last):
  File "/home/jb/.local/bin/streamdeck", line 8, in <module>
    sys.exit(start())
             ^^^^^^^
  File "/home/jb/.local/lib/python3.11/site-packages/streamdeck_ui/gui.py", line 269, in start
    build_device(ui)
  File "/home/jb/.local/lib/python3.11/site-packages/streamdeck_ui/gui.py", line 199, in build_device
    build_buttons(ui, page)
  File "/home/jb/.local/lib/python3.11/site-packages/streamdeck_ui/gui.py", line 129, in build_buttons
    deck = api.get_deck(deck_id)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/jb/.local/lib/python3.11/site-packages/streamdeck_ui/api.py", line 133, in get_deck
    return {"type": decks[deck_id].deck_type(), "layout": decks[deck_id].key_layout()}
                    ~~~~~^^^^^^^^^
KeyError: None

I am running Fedora 37. Error persists whether I am on Wayland or xorg.
Because I had to install so many libraries, I can't (with 100% certainty) state the steps I took to install streamdeck-ui. I ran into pillow and hidapi issues similar to #277.

Any next steps recommended here?

@pblanton
Copy link

pblanton commented Jan 4, 2023

As for me, I also ran lots of library installs trying to get the installer to run on Fedora 37. It seems to me that this is the one that did the trick...

sudo dnf install python3-devel libusb1-devel libusbx-devel libudev-devel systemd-devel

I believe the libusb* libs here are the key.

Now that it is installed I can program the buttons but they don't do anything. Even the buttons that are programmed to switch pages on the device don't do anything. I still suspect a HID or USB library is either missing or ill-configured. I am still on X11, and haven't tried switching back to Wayland yet, but the consensus I've read is that it will not work on Wayland and it's a bit of a pain to switch them so until someone like Crosley tells me to give Wayland a try, I am going to wait and see what success others have.

@Madwonk
Copy link

Madwonk commented Jan 7, 2023

tl;dr this is an upstream bug apparently and can be fixed by running xhost + before the UI

Consider the package in question: File "/usr/lib/python3/dist-packages/pynput/keyboard/__init__.py" is the pynput package, and not actually streamdeck-ui.

A cursory check of the upstream project finds this thread and solution, which works for me:

Run xhost + in the terminal, and it launches fine (at least on my machine). Supposedly it's a bug even further upstream in python-xlib, which I suspect is why upgrading packages might be working for some of you.

@ebdavison
Copy link

ebdavison commented Jan 13, 2023

I am having the same error stated above with the comment from novahazard.

Fedora release 37 (Thirty Seven)
NAME="Fedora Linux"
VERSION="37 (Workstation Edition)"
ID=fedora
VERSION_ID=37
VERSION_CODENAME=""
PLATFORM_ID="platform:f37"
PRETTY_NAME="Fedora Linux 37 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:37"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f37/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=37
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=37
SUPPORT_END=2023-11-14
VARIANT="Workstation Edition"
VARIANT_ID=workstation
Fedora release 37 (Thirty Seven)
Fedora release 37 (Thirty Seven)

@ebdavison
Copy link

I can confirm that python 3.9.16, in a virtual environment, works without any issues.

@dotbanana
Copy link

Same issue(s) here with Fedora 37 on Wayland

@dodgyrabbit
Copy link
Collaborator

See #293 (comment)

@dodgyrabbit
Copy link
Collaborator

A new version has been published (2.0.13) and tested from a clean Fedora 37 install. @novahazard you seem to have a different issue. Could you try the latest version and reopen a new case with details to reproduce and as much info as possible. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants