Closed anoduck closed 2 years ago
Although this issue might appear to be similar to #528, it is not. The error persists through reboot AND has persisted through another system update as well. When first encountered, it was assummed that this error would be resolved in the dev branch and a resolution is simply awaiting release. This is not the case, fetching directly from git and building the module did not resolve the issue. It is surprising there was not already an issue report created for this error, and it appears no one else is encountering it.
Unquestionably, this error is the result of the use of [0]
in line 205 of the wallpaper.get
function in wallpaper.py. Where [0]
does not appear to be defined or is being overwritten in the script.
So, I tried to trace through your code and find your problem, but it appears the version of walli you have posted on github is not the same version you ran here (there is no image = pywal.image.get_random_image(DIR)
in your walli script on github).
Also, the use of [0]
is most certainly defined. util.read_file()
returns a list, so util.read_file(current_wall)[0]
is returning the first item in the list. If there is no first item in the list, then the list must be empty (hence: IndexError: list index out of range
). Why would the list be empty? Because the output of wallpaper.get()
is an empty list. Why would the output of wallpaper.get()
be empty? Maybe you have changed the value of CACHE_DIR
, I see a commented out line in walli that is doing this, but because you aren't running the same version of walli that's on your github, I can't help you any further.
Resolved... ~/.cache/wal/wal
was not a valid file. Removed it, and it works.
After a basic system upgrade, the script that I wrote using pywal to change desktop wallpapers began generating the error
list index out of range
. Since then, I have tried numerous means to circumvent the generation of this error, primarily attempting to avoid pywal from calling thewallpaper.get()
function. Unfortunately, this has not been successful, and the function is executed regardless of how pywal is implemented. Full output is below:My script that uses pywal is located at: https://github.com/anoduck/walli