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

ValueError: The following TaskWarrior color definitions are unsupported in VIT: inverse #361

Open
gour opened this issue Oct 13, 2024 · 1 comment

Comments

@gour
Copy link

gour commented Oct 13, 2024

I use bubblegum-256 theme in TW which has the following definition:

color.overdue=bold inverse

that is problematic for Vit.

To Reproduce

  1. starting vit
$  vit
Traceback (most recent call last):
  File "/usr/bin/vit", line 33, in <module>
    sys.exit(load_entry_point('vit==2.3.2', 'console_scripts', 'vit')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/vit/command_line.py", line 5, in main
    Application(options, filters)
  File "/usr/lib/python3.11/site-packages/vit/application.py", line 81, in __init__
    self.refresh(False)
  File "/usr/lib/python3.11/site-packages/vit/application.py", line 963, in refresh
    self.bootstrap(load_early_config)
  File "/usr/lib/python3.11/site-packages/vit/application.py", line 161, in bootstrap
    self.task_color_config = TaskColorConfig(self.config, self.task_config, self.theme, self.theme_alt_backgrounds)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/vit/color.py", line 31, in __init__
    self.display_attrs_available, self.display_attrs = self.convert_color_config(self.task_config.filter_to_dict(r'^color\.'))
                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/vit/color.py", line 73, in convert_color_config
    foreground, background = self.convert_colors(value)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/vit/color.py", line 95, in convert_colors
    foreground_parts, background_parts = self.make_color_parts(foreground, background)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/vit/color.py", line 115, in make_color_parts
    self.check_invalid_color_parts(foreground_parts)
  File "/usr/lib/python3.11/site-packages/vit/color.py", line 106, in check_invalid_color_parts
    raise ValueError("The following TaskWarrior color definitions are unsupported in VIT: %s -- read the documentation for possible workarounds" % ", ".join(invalid_color_parts))
ValueError: The following TaskWarrior color definitions are unsupported in VIT: inverse -- read the documentation for possible workarounds

Any hint?

Edit: I read COLOR.md file, but wonder how to deal with:

# Due
color.due=
color.due.today=rgb125
color.overdue=bold inverse
@gour
Copy link
Author

gour commented Oct 13, 2024

It is a known issue, so closing it.

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

1 participant