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 can't add multiple dependencies with --extra #1048

Closed
3 tasks done
maksbotan opened this issue Apr 23, 2019 · 4 comments
Closed
3 tasks done

Poetry can't add multiple dependencies with --extra #1048

maksbotan opened this issue Apr 23, 2019 · 4 comments

Comments

@maksbotan
Copy link
Contributor

  • 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.4 (18E226)

  • Poetry version: Poetry 0.12.12

  • Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/maksbotan/c98530347fff1b8e103259ccebd4fe76

Issue

I try to add multiple dependencies adding them to extras (package names only for example):

$ poetry add -vvv -E web -- bottle flask
Virtualenv foo-py3.7 already exists.
Using virtualenv: /Users/maksbotan/Library/Caches/pypoetry/virtualenvs/foo-py3.7
                                                                           
[ValueError]                                                
You can only specify one package when using the --git or --path options  
                                                                           
Exception trace:
 /Users/maksbotan/.poetry/lib/poetry/_vendor/py3.7/cleo/application.py in run() at line 94
   status_code = self.do_run(input_, output_)
 /Users/maksbotan/.poetry/lib/poetry/console/application.py in do_run() at line 88
   return super(Application, self).do_run(i, o)
 /Users/maksbotan/.poetry/lib/poetry/_vendor/py3.7/cleo/application.py in do_run() at line 197
   status_code = command.run(input_, output_)
 /Users/maksbotan/.poetry/lib/poetry/console/commands/command.py in run() at line 77
   return super(BaseCommand, self).run(i, o)
 /Users/maksbotan/.poetry/lib/poetry/_vendor/py3.7/cleo/commands/base_command.py in run() at line 146
   status_code = self.execute(input_, output_)
 /Users/maksbotan/.poetry/lib/poetry/_vendor/py3.7/cleo/commands/command.py in execute() at line 107
   return self.handle()
 /Users/maksbotan/.poetry/lib/poetry/console/commands/add.py in handle() at line 42
   "You can only specify one package "

add [-D|--dev] [--git GIT] [--path PATH] [-E|--extras EXTRAS] [--optional] [--python PYTHON] [--platform PLATFORM] [--allow-prereleases] [--dry-run] [--] <name> (<name>)...

If I call poetry add -E web for each individual package I get what I expect.

I think that at least error message should be more helpful, since I'm clearly not using --git or --path.

@ulope
Copy link

ulope commented Jun 19, 2019

Duplicate of #429

@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
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

2 participants