Click argument error
Opened this issue · 1 comments
Spoons commented
❯ ./topalias.sh
Traceback (most recent call last):
File "/mnt/build/software/topalias/topalias/cli.py", line 167, in <module>
sys.exit(cli()) # pragma: no cover # pylint: disable=no-value-for-parameter
File "/usr/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/click/core.py", line 1052, in main
with self.make_context(prog_name, args, **extra) as ctx:
File "/usr/lib/python3.9/site-packages/click/core.py", line 914, in make_context
self.parse_args(ctx, args)
File "/usr/lib/python3.9/site-packages/click/core.py", line 1615, in parse_args
rest = super().parse_args(ctx, args)
File "/usr/lib/python3.9/site-packages/click/core.py", line 1370, in parse_args
value, args = param.handle_parse_result(ctx, opts, args)
File "/usr/lib/python3.9/site-packages/click/core.py", line 2347, in handle_parse_result
value = self.process_value(ctx, value)
File "/usr/lib/python3.9/site-packages/click/core.py", line 2309, in process_value
value = self.callback(ctx, self, value)
TypeError: print_version() takes 2 positional arguments but 3 were given
Report you great ideas and any feedback: https://github.com/CSRedRat/topalias/issues/new
Cool project. Looks like the Click api use is incorrect or has changed. Also, I think you mean 'your great ideas'.
Deleted user commented
It worked by downgrading click to 7.1.2
Here is what I did, using pipx
pipx runpip topalias install -U click==7.1.2
topalias -h
Usage: topalias [OPTIONS] COMMAND [ARGS]...
See documentation and usage examples: https://csredrat.github.io/topalias
Options:
-l, --min INTEGER Print alias acronym not less that value. Default: 1
-c, --count INTEGER Print specified number acronym suggestions. Default:
20
--filter Filter used aliases in history. Default: False
-z, --zsh Use zsh shell history file .zsh_history. Default:
False
-f, --path TEXT Change custom directory for files: .bash_aliases,
.bash_history, .zsh_history
--version Print current program version and check latest on
pypi.org.
--debug / --no-debug Enable debug strings in output.
-h, --help Show this message and exit.
Commands:
hint Print all hints.
history Print bash history file.
main Main function for group command call.
version Get program current and available version.