gnebbia / kb

A minimalist command line knowledge base manager
GNU General Public License v3.0
3.17k stars 104 forks source link

Install not working with pipx, colored.exception.InvalidStyle error #108

Closed ghost closed 8 months ago

ghost commented 1 year ago

Expected Behavior

Installs with pipx and works

Actual Behavior

Gives an error when trying to launch:

Traceback (most recent call last):
  File "/home/username/.local/bin/kb", line 5, in <module>
    from kb.main import main
  File "/home/username/.local/pipx/venvs/kb-manager/lib/python3.11/site-packages/kb/main.py", line 20, in <module>
    from kb.commands.search import search
  File "/home/username/.local/pipx/venvs/kb-manager/lib/python3.11/site-packages/kb/commands/search.py", line 17, in <module>
    import kb.printer.search as printer
  File "/home/username/.local/pipx/venvs/kb-manager/lib/python3.11/site-packages/kb/printer/search.py", line 15, in <module>
    from kb.printer.style import ALT_BGROUND, BOLD, UND, RESET
  File "/home/username/.local/pipx/venvs/kb-manager/lib/python3.11/site-packages/kb/printer/style.py", line 20, in <module>
    UND = styler.set_style('underlined')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/username/.local/pipx/venvs/kb-manager/lib/python3.11/site-packages/kb/styler.py", line 58, in set_style
    return colored.attr(style)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/username/.local/pipx/venvs/kb-manager/lib/python3.11/site-packages/colored/colored.py", line 263, in attr
    return Colored(name).attribute()
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/username/.local/pipx/venvs/kb-manager/lib/python3.11/site-packages/colored/colored.py", line 64, in attribute
    self._utils.is_style_exist(self._name)
  File "/home/username/.local/pipx/venvs/kb-manager/lib/python3.11/site-packages/colored/utilities.py", line 53, in is_style_exist
    raise InvalidStyle(f'{InvalidStyle.__name__}: {name}')
colored.exceptions.InvalidStyle: InvalidStyle: underlined

Steps to Reproduce the Problem

pipx install kb-manager kb

Specifications

octoshrimpy commented 1 year ago

Same thing here. Endeavouros (arch), otherwise everything the same.

AaronFeldman commented 11 months ago

Same error using ubuntu/wayland python3 Also same result with installing from Github

gnebbia commented 8 months ago

This has been fixed, it was because of a name change in the library "colored"