Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

AttributeError: 'Color' object has no attribute 'alpha_dec'. Did you mean: 'alpha_num'? #705

Open
yuceltoluyag opened this issue May 6, 2023 · 1 comment

Comments

@yuceltoluyag
Copy link

yuceltoluyag commented May 6, 2023

python --version
Python 3.11.3

uname -a
Linux jason 6.3.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 01 May 2023 17:42:39 +0000 x86_64 GNU/Linux

i am using this package https://archlinux.org/packages/community/any/python-pywal/ (It is this package that gives the following error)

If you use this package you will not encounter this error https://aur.archlinux.org/packages/pywal-git

[friday13@jason ~]$ wal -i Pictures/waterfall2.png
[I] image: Using image waterfall2.png.
[I] theme: Set theme to _home_friday13_Pictures_waterfall2_png_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 'alpha_dec'. Did you mean: 'alpha_num'?

@Whop42
Copy link

Whop42 commented May 8, 2023

I'm experiencing a similar issue (also with python-pywal, on updated Arch). It works on pywal-git for me, as well.

➜ wal -i ~/Downloads/wallhaven-5g5p23.jpg
[I] image: Using image wallhaven-5g5p23.jpg.
[I] theme: Set theme to _home_whop42_Downloads_wallhaven-5g5p23_jpg_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'

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