You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TOML languages allows comments inside arrays. When having such comments inside the authors array in pyproject.toml, the existence of any tool.* section not part of what poetry uses for its own purposes makes poetry in version 1.1.14 parse comments as actual authors.
With the provided pyproject.toml, a poetry install or any other command fails with:
RuntimeError
The Poetry configuration is invalid:
- [authors.1] None is not of type 'string'
- [authors.3] None is not of type 'string'
at /usr/lib/python3.10/site-packages/poetry/core/factory.py:43 in create_poetry
39│ message = ""
40│ for error in check_result["errors"]:
41│ message += " - {}\n".format(error)
42│
→ 43│ raise RuntimeError("The Poetry configuration is invalid:\n" + message)
44│
45│ # Load package
46│ name = local_config["name"]
47│ version = local_config["version"]
/tmp/test via 🐍 v3.10.5 ☸ bau365-production (applications)
❯ poetry install -vvv
Stack trace:
9 /usr/lib/python3.10/site-packages/clikit/console_application.py:131 in run
129│ parsed_args = resolved_command.args
130│
→ 131│ status_code = command.handle(parsed_args, io)
132│ except KeyboardInterrupt:
133│ status_code = 1
8 /usr/lib/python3.10/site-packages/clikit/api/command/command.py:120 in handle
118│ def handle(self, args, io): # type: (Args, IO) -> int
119│ try:
→ 120│ status_code = self._do_handle(args, io)
121│ except KeyboardInterrupt:
122│ if io.is_debug():
7 /usr/lib/python3.10/site-packages/clikit/api/command/command.py:163 in _do_handle
161│ if self._dispatcher and self._dispatcher.has_listeners(PRE_HANDLE):
162│ event = PreHandleEvent(args, io, self)
→ 163│ self._dispatcher.dispatch(PRE_HANDLE, event)
164│
165│ if event.is_handled():
6 /usr/lib/python3.10/site-packages/clikit/api/event/event_dispatcher.py:22 in dispatch
20│
21│ if listeners:
→ 22│ self._do_dispatch(listeners, event_name, event)
23│
24│ return event
5 /usr/lib/python3.10/site-packages/clikit/api/event/event_dispatcher.py:89 in _do_dispatch
87│ break
88│
→ 89│ listener(event, event_name, self)
90│
91│ def _sort_listeners(self, event_name): # type: (str) -> None
4 /usr/lib/python3.10/site-packages/poetry/console/config/application_config.py:116 in set_env
114│
115│ io = event.io
→ 116│ poetry = command.poetry
117│
118│ env_manager = EnvManager(poetry)
3 /usr/lib/python3.10/site-packages/poetry/console/commands/command.py:10 in poetry
8│ @property
9│ def poetry(self):
→ 10│ return self.application.poetry
11│
12│ def reset_poetry(self): # type: () -> None
2 /usr/lib/python3.10/site-packages/poetry/console/application.py:69 in poetry
67│ return self._poetry
68│
→ 69│ self._poetry = Factory().create_poetry(Path.cwd())
70│
71│ return self._poetry
1 /usr/lib/python3.10/site-packages/poetry/factory.py:33 in create_poetry
31│ io = NullIO()
32│
→ 33│ base_poetry = super(Factory, self).create_poetry(cwd)
34│
35│ locker = Locker(
RuntimeError
The Poetry configuration is invalid:
- [authors.1] None is not of type 'string'
- [authors.3] None is not of type 'string'
at /usr/lib/python3.10/site-packages/poetry/core/factory.py:43 in create_poetry
39│ message = ""
40│ for error in check_result["errors"]:
41│ message += " - {}\n".format(error)
42│
→ 43│ raise RuntimeError("The Poetry configuration is invalid:\n" + message)
44│
45│ # Load package
46│ name = local_config["name"]
47│ version = local_config["version"]
After removing the section tool.doesnt.matter.but.triggers.this the configuration of the project is perfectly fine.
This happens for any tool section not part of what poetry uses for its own purposes.
The text was updated successfully, but these errors were encountered:
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: Archlinux
Poetry version: 1.1.14
Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/languitar/625f124b7820e7ee149aa15eabf4f119
Issue
The TOML languages allows comments inside arrays. When having such comments inside the authors array in
pyproject.toml
, the existence of anytool.*
section not part of what poetry uses for its own purposes makes poetry in version 1.1.14 parse comments as actual authors.With the provided
pyproject.toml
, apoetry install
or any other command fails with:After removing the section
tool.doesnt.matter.but.triggers.this
the configuration of the project is perfectly fine.This happens for any tool section not part of what poetry uses for its own purposes.
The text was updated successfully, but these errors were encountered: