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

patchwork --version error #4

Closed
codelion opened this issue Apr 8, 2024 · 2 comments
Closed

patchwork --version error #4

codelion opened this issue Apr 8, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@codelion
Copy link
Member

codelion commented Apr 8, 2024

(patchwork-cli-py3.10) user@Users-MBP patchwork % patchwork --version
Traceback (most recent call last):
File "/Users/user/Documents/GitHub/patchwork/.venv/bin/patchwork", line 6, in
sys.exit(cli())
File "/Users/user/Documents/GitHub/patchwork/.venv/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/Users/user/Documents/GitHub/patchwork/.venv/lib/python3.10/site-packages/click/core.py", line 1077, in main
with self.make_context(prog_name, args, **extra) as ctx:
File "/Users/user/Documents/GitHub/patchwork/.venv/lib/python3.10/site-packages/click/core.py", line 943, in make_context
self.parse_args(ctx, args)
File "/Users/user/Documents/GitHub/patchwork/.venv/lib/python3.10/site-packages/click/core.py", line 1408, in parse_args
value, args = param.handle_parse_result(ctx, opts, args)
File "/Users/user/Documents/GitHub/patchwork/.venv/lib/python3.10/site-packages/click/core.py", line 2400, in handle_parse_result
value = self.process_value(ctx, value)
File "/Users/user/Documents/GitHub/patchwork/.venv/lib/python3.10/site-packages/click/core.py", line 2362, in process_value
value = self.callback(ctx, self, value)
File "/Users/user/Documents/GitHub/patchwork/.venv/lib/python3.10/site-packages/click/decorators.py", line 506, in callback
raise RuntimeError(
RuntimeError: 'patchwork' is not installed. Try passing 'package_name' instead.

@codelion codelion added enhancement New feature or request good first issue Good for newcomers labels Apr 8, 2024
@codelion
Copy link
Member Author

codelion commented May 2, 2024

The issue pertains to running patchwork CLI locally. To recreate, install patchwork-cli and run the command 'patchwork --version'. Patchwork uses the click library to manage the CLI. To fix the issue, make sure the '--version' argument is handled.

Reference: https://click.palletsprojects.com/en/8.1.x/options/#callbacks-and-eager-options

The following files in the repository may be relevant to the issue:


  • patchwork/app.py

@codelion
Copy link
Member Author

codelion commented May 2, 2024

Fixed in #55 #57

@codelion codelion closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant