-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected
Description
- 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 (
-vvvoption).
- OS version and name: macOS Catalina 10.15.1
- Poetry version: Poetry version 1.0.0
- Link of a Gist with the contents of your pyproject.toml file: https://github.com/emoji-gen/ecode-py/blob/2a1cd36bd3b3e4cf2fae5340a2376f3292db151c/pyproject.toml
Issue
Hello. I tried to publish my project to testpypi, but it failed.
I used only environment variables to configure Poetry. I guess it is cause of failure.
How can I set configuration to publish to custom repository only by environment variables?
The following are the details.
$ rm -rf dist/
$ poetry build -f wheel
Building ecode (0.1.1)
- Building wheel
- Built ecode-0.1.1-py3-none-any.whl
$ set -x POETRY_REPOSITORIES_TESTPYPI https://test.pypi.org/legacy/
$ set -x POETRY_HTTP_BASIC_TESTPYPI_USERNAME pine
$ set -x POETRY_HTTP_BASIC_TESTPYPI_PASSWORD XXX
$ poetry publish -r testpypi -vvv
Publishing ecode (0.1.1) to testpypi
[TypeError]
string indices must be integers
Traceback (most recent call last):
File "/Users/pine/.anyenv/envs/pyenv/versions/3.8.0/lib/python3.8/site-packages/clikit/console_application.py", line 131, in run
status_code = command.handle(parsed_args, io)
File "/Users/pine/.anyenv/envs/pyenv/versions/3.8.0/lib/python3.8/site-packages/clikit/api/command/command.py", line 120, in handle
status_code = self._do_handle(args, io)
File "/Users/pine/.anyenv/envs/pyenv/versions/3.8.0/lib/python3.8/site-packages/clikit/api/command/command.py", line 171, in _do_handle
return getattr(handler, handler_method)(args, io, self)
File "/Users/pine/.anyenv/envs/pyenv/versions/3.8.0/lib/python3.8/site-packages/cleo/commands/command.py", line 92, in wrap_handle
return self.handle()
File "/Users/pine/.anyenv/envs/pyenv/versions/3.8.0/lib/python3.8/site-packages/poetry/console/commands/publish.py", line 76, in handle
publisher.publish(
File "/Users/pine/.anyenv/envs/pyenv/versions/3.8.0/lib/python3.8/site-packages/poetry/masonry/publishing/publisher.py", line 59, in publish
url = repository["url"]
$ set -e POETRY_REPOSITORIES_TESTPYPI # Erase the variable
$ set -x POETRY_REPOSITORIES_TESTPYPI_URL https://test.pypi.org/legacy/
$ poetry publish -r testpypi -vvv
Publishing ecode (0.1.1) to testpypi
[NonExistentKey]
'Key "url" does not exist.'
Traceback (most recent call last):
File "/Users/pine/.anyenv/envs/pyenv/versions/3.8.0/lib/python3.8/site-packages/clikit/console_application.py", line 131, in run
status_code = command.handle(parsed_args, io)
File "/Users/pine/.anyenv/envs/pyenv/versions/3.8.0/lib/python3.8/site-packages/clikit/api/command/command.py", line 120, in handle
status_code = self._do_handle(args, io)
File "/Users/pine/.anyenv/envs/pyenv/versions/3.8.0/lib/python3.8/site-packages/clikit/api/command/command.py", line 171, in _do_handle
return getattr(handler, handler_method)(args, io, self)
File "/Users/pine/.anyenv/envs/pyenv/versions/3.8.0/lib/python3.8/site-packages/cleo/commands/command.py", line 92, in wrap_handle
return self.handle()
File "/Users/pine/.anyenv/envs/pyenv/versions/3.8.0/lib/python3.8/site-packages/poetry/console/commands/publish.py", line 76, in handle
publisher.publish(
File "/Users/pine/.anyenv/envs/pyenv/versions/3.8.0/lib/python3.8/site-packages/poetry/masonry/publishing/publisher.py", line 59, in publish
url = repository["url"]
File "/Users/pine/.anyenv/envs/pyenv/versions/3.8.0/lib/python3.8/site-packages/tomlkit/items.py", line 1008, in __getitem__
return self._value[key]
File "/Users/pine/.anyenv/envs/pyenv/versions/3.8.0/lib/python3.8/site-packages/tomlkit/container.py", line 524, in __getitem__
raise NonExistentKey(key)I used Python 3.8.0 with pyenv, and fish shell 3.0.2. Thank you.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected