Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Crash on missing desktop environment #54

Open
sanderd17 opened this issue Jan 21, 2019 · 2 comments
Open

Crash on missing desktop environment #54

sanderd17 opened this issue Jan 21, 2019 · 2 comments

Comments

@sanderd17
Copy link

I assume this was introduced with #44

But apparently, DESKTOP_SESSION is None when using i3.

[sander@ATLPOR13 ~]$ wallpaper-reddit wallpapers
searching for valid images...
downloading https://i.imgur.com/kE2yyYK.jpg
Traceback (most recent call last):
  File "/usr/bin/wallpaper-reddit", line 11, in <module>
    load_entry_point('wallpaper-reddit==3.1.1', 'console_scripts', 'wallpaper-reddit')()
  File "/usr/lib/python3.7/site-packages/wpreddit/main.py", line 46, in run
    wallpaper.set_wallpaper()
  File "/usr/lib/python3.7/site-packages/wpreddit/wallpaper.py", line 25, in set_wallpaper
    linux_wallpaper()
  File "/usr/lib/python3.7/site-packages/wpreddit/wallpaper.py", line 40, in linux_wallpaper
    elif check_de(de, ["gnome", "gnome-xorg", "gnome-wayland", "unity", "ubuntu", "ubuntu-xorg", "budgie-desktop"]):
  File "/usr/lib/python3.7/site-packages/wpreddit/wallpaper.py", line 31, in check_de
    return any([de in current_de for de in list_of_de])
  File "/usr/lib/python3.7/site-packages/wpreddit/wallpaper.py", line 31, in <listcomp>
    return any([de in current_de for de in list_of_de])
TypeError: argument of type 'NoneType' is not iterable
@sanderd17
Copy link
Author

Hmm, setting the DESKTOP_SESSION inside my bashrc also did the trick. Not sure what to do with this.

@markubiak
Copy link
Owner

I think your assessment that it was introduced by #44 is correct. I'll dig through, likely forgot to check for an empty list somewhere.

Mark

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants