-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
-
Poetry version: 1.1.12 and 1.2.2
-
Python version: 3.9.13
-
OS version and name: Windows Server 2016 x64
-
I am on the latest stable Poetry version, installed using a recommended method.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
I have consulted the FAQ and blog for any relevant entries or release notes.
-
[x If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption) and have included the output below.
Issue
If a package has an invalid author then the package cannot be installed by poetry.
I have a package that has the following author FirstName LastName [email protected], it's missing the <, > characters from the email part, which prevents poetry from installing it.
Although the author is wrong it shouldn't really prevent the package from being installed, no ? Maybe it should report a warning or something, but continue.
Also, the package isn't reported, so you have no idea which package is the culprit.
Stack trace:
9 c:\program files\python39\lib\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 c:\program files\python39\lib\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 c:\program files\python39\lib\site-packages\clikit\api\command\command.py:171 in _do_handle
169│ handler_method = self._config.handler_method
170│
→ 171│ return getattr(handler, handler_method)(args, io, self)
172│
173│ def __repr__(self): # type: () -> str
6 c:\program files\python39\lib\site-packages\cleo\commands\command.py:92 in wrap_handle
90│ self._command = command
91│
→ 92│ return self.handle()
93│
94│ def handle(self): # type: () -> Optional[int]
5 c:\program files\python39\lib\site-packages\poetry\console\commands\install.py:80 in handle
78│
79│ try:
→ 80│ builder = EditableBuilder(self.poetry, self._env, self._io)
81│ except ModuleOrPackageNotFound:
82│ # This is likely due to the fact that the project is an application
4 c:\program files\python39\lib\site-packages\poetry\masonry\builders\editable.py:34 in __init__
32│ class EditableBuilder(Builder):
33│ def __init__(self, poetry, env, io):
→ 34│ super(EditableBuilder, self).__init__(poetry)
35│
36│ self._env = env
3 c:\program files\python39\lib\site-packages\poetry\core\masonry\builders\builder.py:92 in __init__
90│ )
91│
→ 92│ self._meta = Metadata.from_package(self._package)
93│
94│ @property
2 c:\program files\python39\lib\site-packages\poetry\core\masonry\metadata.py:60 in from_package
58│ meta.keywords = ",".join(package.keywords)
59│ meta.home_page = package.homepage or package.repository_url
→ 60│ meta.author = package.author_name
61│ meta.author_email = package.author_email
62│
1 c:\program files\python39\lib\site-packages\poetry\core\packages\package.py:173 in author_name
171│ @property
172│ def author_name(self): # type: () -> str
→ 173│ return self._get_author()["name"]
174│
175│ @property
ValueError
Invalid author string. Must be in the format: John Smith <[email protected]>
at c:\program files\python39\lib\site-packages\poetry\core\packages\package.py:204 in _get_author
200│
201│ m = AUTHOR_REGEX.match(self._authors[0])
202│
203│ if m is None:
→ 204│ raise ValueError(
205│ "Invalid author string. Must be in the format: "
206│ "John Smith <[email protected]>"
207│ )
208│