dylanaraps / pywal

🎨 Generate and change color-schemes on the fly.
MIT License
8.23k stars 313 forks source link

Help troubleshooting a new issue for me #607

Closed andrewschott closed 3 years ago

andrewschott commented 3 years ago

Recently I finally rebooted and came to an issue with wal that causes it to barf out:

$ wal -f "/home/andrew/Pictures/Wallpapers/i3wm.jpg"
[I] theme: Set theme to i3wm.jpg.
Traceback (most recent call last):
  File "/home/andrew/.local/bin/wal", line 33, in <module>
    sys.exit(load_entry_point('pywal==3.3.0', 'console_scripts', 'wal')())
  File "/home/andrew/.local/lib/python3.9/site-packages/pywal/__main__.py", line 208, in main
    parse_args(parser)
  File "/home/andrew/.local/lib/python3.9/site-packages/pywal/__main__.py", line 167, in parse_args
    colors_plain = theme.file(args.theme, args.l)
  File "/home/andrew/.local/lib/python3.9/site-packages/pywal/theme.py", line 119, in file
    return parse(theme_file)
  File "/home/andrew/.local/lib/python3.9/site-packages/pywal/theme.py", line 69, in parse
    data = util.read_file_json(theme_file)
  File "/home/andrew/.local/lib/python3.9/site-packages/pywal/util.py", line 68, in read_file_json
    return json.load(json_file)
  File "/usr/lib64/python3.9/json/__init__.py", line 293, in load
    return loads(fp.read(),
  File "/usr/lib64/python3.9/codecs.py", line 322, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

Any tips on where to begin? This is on Fedora 33 Workstation in case that matters. I think this has to do with an update that I applied over the course of the last few weeks, as nothing else has really changed.

Thanks!

EDIT I installed pywal via pip in a --userintall (so not globally) and the path is in my exported path.

andrewschott commented 3 years ago

Reinstalled and things work correctly. Not sure what happened ... But hey, its fixed!