dylanaraps / pywal

🎨 Generate and change color-schemes on the fly.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

yuceltoluyag opened this issue · comments

commented

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'?

commented

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'