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

KeyError #50

Closed
Gamferno opened this issue May 23, 2022 · 6 comments
Closed

KeyError #50

Gamferno opened this issue May 23, 2022 · 6 comments
Labels
bug Something isn't working question Further information is requested

Comments

@Gamferno
Copy link

Completed all the installation steps but got this output as issue

Config JSON:
{'audio_volume': 50,
 'data_source': None,
 'is_detect_maximized': True,
 'is_mute': False,
 'is_static_wallpaper': True,
 'mode': None,
 'static_wallpaper_blur_radius': 5,
 'version': 2}
Mode: Null
Monitor: width 1366 height 1366
WindowHandler: {'is_any_maximized': False, 'is_any_fullscreen': True}
Traceback (most recent call last):
  File "/home/om/bin/hidamari", line 33, in <module>
    server.run()
  File "/home/om/.hidamari/server.py", line 172, in run
    hidamari.dbus_published_callback()
  File "/home/om/.hidamari/server.py", line 50, in null
    self.player = NullPlayer(self.config)
  File "/home/om/.hidamari/null_player.py", line 15, in __init__
    self.menu = self._build_context_menu()
  File "/home/om/.hidamari/base_player.py", line 83, in _build_context_menu
    if 'gnome' in os.environ['XDG_CURRENT_DESKTOP'].lower():
  File "/usr/lib/python3.10/os.py", line 679, in __getitem__
    raise KeyError(key) from None
KeyError: 'XDG_CURRENT_DESKTOP'
@jeffshee jeffshee added the bug Something isn't working label Jul 10, 2022
@jeffshee
Copy link
Owner

Hi @Gamferno,
it seems like a distro/DE-specific issue. What distro and DE are you using?
Please check the output of echo $XDG_SESSION_TYPE too.

@jeffshee jeffshee added the question Further information is requested label Jul 10, 2022
@jeffshee
Copy link
Owner

jeffshee commented Sep 6, 2022

Closed as the new release is out. Feel free to reopen if the issue still remains.

@jeffshee jeffshee closed this as completed Sep 6, 2022
@AZMCode
Copy link
Contributor

AZMCode commented Jul 15, 2023

I can confirm I get this bug when using the sway window manager.
The value of this environment variable is unset, and the value of XDG_SESSION_TYPE is wayland

@AZMCode
Copy link
Contributor

AZMCode commented Jul 15, 2023

The program seems to not be able to handle if this variable is unset

@AZMCode
Copy link
Contributor

AZMCode commented Jul 15, 2023

Traceback (most recent call last):
  File "/app/bin/hidamari", line 44, in <module>
    sys.exit(main.main(VERSION, pkgdatadir, localedir))
  File "/app/share/hidamari/hidamari/__main__.py", line 41, in main
    sys_info.append(f"is_gnome = {is_gnome()}")
  File "/app/share/hidamari/hidamari/utils.py", line 27, in is_gnome
    return "gnome" in os.environ.get("XDG_CURRENT_DESKTOP").lower()
AttributeError: 'NoneType' object has no attribute 'lower'

AZMCode added a commit to AZMCode/hidamari that referenced this issue Jul 15, 2023
@AZMCode
Copy link
Contributor

AZMCode commented Jul 15, 2023

Created a pull request that fixes the issue

jeffshee pushed a commit that referenced this issue Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants