reddit-background
reddit-background copied to clipboard
No such file or directory
Hello,
Here is the error i ran into after running the script for the first time:
Traceback (most recent call last):
File "/usr/local/bin/reddit-background", line 791, in <module>
main()
File "/usr/local/bin/reddit-background", line 787, in main
desktop.set_background(paths[0])
File "/usr/local/bin/reddit-background", line 455, in set_background
_OS_HANDLER.set_background(path, num=self.num)
File "/usr/local/bin/reddit-background", line 200, in set_background
if subprocess.call(cmd):
File "/usr/lib/python2.7/subprocess.py", line 523, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
Please tell me if i can help you patch this. Have a nice day
After quick investigation:
Line 200, you have this
cmd = ['feh', '--bg-fill', path]
If i print this variable it gives me:
['feh', '--bg-fill', u'/home/<username>/Reddit Backgrounds/Desktop 1/China is a truly underrated country in terms of natural beaut.jpg']
Problem is, i think spaces are not ecaped. The correct path is:
/home/<username>/Reddit\ Backgrounds/Desktop\ 1/China\ is\ a\ truly\ underrated\ country\ in\ terms\ of\ natural\ beaut.jpg
I hope this help.
You must install FEH: sudo apt install feh