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

AttributeError: 'Color' object has no attribute 'red' #2

Closed
TheRedstoneRadiant opened this issue Mar 27, 2024 · 1 comment
Closed

Comments

@TheRedstoneRadiant
Copy link

Hey! I'm trying to use this theme, but after copying discord-wal.css to $HOME/.config/wal/templates and running pywal, I get the following error:

> wal -i X39qMYI.jpeg
[I] image: Using image X39qMYI.jpeg.
[I] theme: Set theme to _home_user_Wallpapers_X39qMYI_jpeg_dark_None_None_1.1.0.json.
[I] colors: Found cached colorscheme.
[I] wallpaper: Set the new wallpaper.
[I] sequences: Set terminal colors.

Traceback (most recent call last):
  File "/usr/bin/wal", line 33, in <module>
    sys.exit(load_entry_point('pywal==3.3.0', 'console_scripts', 'wal')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pywal/__main__.py", line 208, in main
    parse_args(parser)
  File "/usr/lib/python3.11/site-packages/pywal/__main__.py", line 185, in parse_args
    export.every(colors_plain)
  File "/usr/lib/python3.11/site-packages/pywal/export.py", line 68, in every
    template(colors, file.path, join(output_dir, file.name))
  File "/usr/lib/python3.11/site-packages/pywal/export.py", line 15, in template
    template_data = "".join(template_data).format(**colors)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Color' object has no attribute 'red'

~/Wallpapers                                                                                                         
> wal -v
wal 3.3.0

When running with the wal backend, I get a different error message:

> wal -i X39qMYI.jpeg -b wal
[I] image: Using image X39qMYI.jpeg.
[I] theme: Set theme to _home_user_Wallpapers_X39qMYI_jpeg_dark_None_None_1.1.0.json.
[I] colors: Found cached colorscheme.
[I] wallpaper: Set the new wallpaper.
[I] sequences: Set terminal colors.

Traceback (most recent call last):
  File "/usr/bin/wal", line 33, in <module>
    sys.exit(load_entry_point('pywal==3.3.0', 'console_scripts', 'wal')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pywal/__main__.py", line 208, in main
    parse_args(parser)
  File "/usr/lib/python3.11/site-packages/pywal/__main__.py", line 185, in parse_args
    export.every(colors_plain)
  File "/usr/lib/python3.11/site-packages/pywal/export.py", line 68, in every
    template(colors, file.path, join(output_dir, file.name))
  File "/usr/lib/python3.11/site-packages/pywal/export.py", line 15, in template
    template_data = "".join(template_data).format(**colors)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pywal/util.py", line 25, in rgb
    return "%s,%s,%s" % (*hex_to_rgb(self.hex_color),)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pywal/util.py", line 116, in hex_to_rgb
    return tuple(bytes.fromhex(color.strip("#")))
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: non-hexadecimal number found in fromhex() arg at position 0

pywal installed via AUR (extra/python-pywal, version 3.3.0-8).

Please let me know if you need any more information. Thanks.

@Gremious
Copy link
Owner

Gremious commented Mar 31, 2024

So, apparently, the official current 3.3.0 pywal release doesn't support .color modifiers.
I did a manual git install and that did work.

So, solution there is ether install 3.3.1 from latest git directly, or use wallust instead of pywal.


As for the wal backend breaking:

The backend issue is ...drum roll... pilot error. This is the error you get when you use -b instead of --backend.

dylanaraps/pywal#358 (comment)

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

No branches or pull requests

2 participants