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

poetry search doesn't like being verbose #1141

Closed
2 of 3 tasks
jeamland opened this issue May 31, 2019 · 8 comments
Closed
2 of 3 tasks

poetry search doesn't like being verbose #1141

jeamland opened this issue May 31, 2019 · 8 comments

Comments

@jeamland
Copy link

jeamland commented May 31, 2019

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: macOS Mojave 10.14.5, Python 3.7.3 from Homebrew
  • Poetry version: 1.0.0a2
  • Link of a Gist with the contents of your pyproject.toml file: Not Applicable

Issue

I'm trying to add a private package repository to my pyproject.toml and went to test it via search. This works:

$ poetry search modhex

modhex (0.1)
 Translate yubikey one-time passwords to modhex regardless of keyboard layout.
$

However if I try to get some kind of debugging as to what it's doing in the background:

$ poetry -vvv search modhex

[CannotParseArgsException]
Too many arguments.

Traceback (most recent call last):
  File "/Users/benno/.poetry/lib/poetry/_vendor/py3.7/clikit/console_application.py", line 127, in run
    resolved_command = self.resolve_command(args)
  File "/Users/benno/.poetry/lib/poetry/_vendor/py3.7/clikit/console_application.py", line 110, in resolve_command
    return self._config.command_resolver.resolve(args, self)
  File "/Users/benno/.poetry/lib/poetry/_vendor/py3.7/clikit/resolver/default_resolver.py", line 45, in resolve
    return self.create_resolved_command(result)
  File "/Users/benno/.poetry/lib/poetry/_vendor/py3.7/clikit/resolver/default_resolver.py", line 167, in create_resolved_command
    raise result.parse_error
  File "/Users/benno/.poetry/lib/poetry/_vendor/py3.7/clikit/resolver/resolve_result.py", line 49, in _parse
    self._parsed_args = self._command.parse(self._raw_args)
  File "/Users/benno/.poetry/lib/poetry/_vendor/py3.7/clikit/api/command/command.py", line 106, in parse
    return self._config.args_parser.parse(args, self._args_format, lenient)
  File "/Users/benno/.poetry/lib/poetry/_vendor/py3.7/clikit/args/default_args_parser.py", line 58, in parse
    self._insert_missing_command_names(arguments, command_names, lenient)
  File "/Users/benno/.poetry/lib/poetry/_vendor/py3.7/clikit/args/default_args_parser.py", line 136, in _insert_missing_command_names
    lenient,
  File "/Users/benno/.poetry/lib/poetry/_vendor/py3.7/clikit/args/default_args_parser.py", line 167, in _copy_argument_values
    raise CannotParseArgsException.too_many_arguments()
$

This happens whether or not I have added extra [[tool.poetry.source]] stanzas to my pyproject.toml.

Also of note:

$ poetry -vvv search
USAGE
  poetry search [-N] <tokens1> ... [<tokensN>]

ARGUMENTS
  <tokens>               The tokens to search for.

OPTIONS
  -N (--only-name)       Search only in name.

GLOBAL OPTIONS
  -h (--help)            Display this help message
  -q (--quiet)           Do not output any message
  -v (--verbose)         Increase the verbosity of messages: "-v" for normal
                         output, "-vv" for more verbose output and "-vvv" for
                         debug
  -V (--version)         Display this application version
  --ansi                 Force ANSI output
  --no-ansi              Disable ANSI output
  -n (--no-interaction)  Do not ask any interactive question

$
@jeamland
Copy link
Author

Similar issue happens with poetry add.

@djetelina
Copy link

Have you tried poetry search -vvv? Both approaches work on 0.12.16 though, might be an issue with new cleo and not poetry really.

@bersace
Copy link

bersace commented Jun 4, 2019

I confirm this with poetry 1.0.0a3, poetry -vvv show flake8.

That may be unrelated, but poetry -vvv show drops help and exits with 0.

@bersace
Copy link

bersace commented Jun 4, 2019

I have a somewhat similar exception with poetry add --help :

$ poetry add --help

[CannotParseArgsException]
Not enough arguments (missing: "name").

@stale
Copy link

stale bot commented Nov 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 13, 2019
@stale
Copy link

stale bot commented Nov 20, 2019

Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one.

@stale stale bot closed this as completed Nov 20, 2019
@alexd2580
Copy link

Also happens with poetry -vvv run main:
Drops help and exits

Copy link

github-actions bot commented Mar 3, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants