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

AttributeError with missing email in authors entry #66

Closed
blueyed opened this issue Apr 22, 2018 · 5 comments
Closed

AttributeError with missing email in authors entry #66

blueyed opened this issue Apr 22, 2018 · 5 comments

Comments

@blueyed
Copy link
Contributor

blueyed commented Apr 22, 2018

When using no email with entries in authors (authors = ["Alice"]),
poetry -vvv build fails:

  [AttributeError]                            
  'NoneType' object has no attribute 'group'  
                                              

Exception trace:
 /home/user/.local/lib/python3.6/site-packages/cleo/application.py in run() at line 94
   status_code = self.do_run(input_, output_)
 /home/user/.local/lib/python3.6/site-packages/poetry/console/application.py in do_run() at line 74
   return super(Application, self).do_run(i, o)
 /home/user/.local/lib/python3.6/site-packages/cleo/application.py in do_run() at line 197
   status_code = command.run(input_, output_)
 /home/user/.local/lib/python3.6/site-packages/poetry/console/commands/command.py in run() at line 22
   return super(BaseCommand, self).run(i, o)
 /home/user/.local/lib/python3.6/site-packages/cleo/commands/base_command.py in run() at line 146
   status_code = self.execute(input_, output_)
 /home/user/.local/lib/python3.6/site-packages/cleo/commands/command.py in execute() at line 107
   return self.handle()
 /home/user/.local/lib/python3.6/site-packages/poetry/console/commands/build.py in handle() at line 26
   builder.build(fmt)
 /home/user/.local/lib/python3.6/site-packages/poetry/masonry/builder.py in build() at line 23
   builder = self._FORMATS[fmt](self._poetry, self._venv, self._io)
 /home/user/.local/lib/python3.6/site-packages/poetry/masonry/builders/builder.py in __init__() at line 41
   self._meta = Metadata.from_package(self._package)
 /home/user/.local/lib/python3.6/site-packages/poetry/masonry/metadata.py in from_package() at line 53
   meta.author = package.author_name
 /home/user/.local/lib/python3.6/site-packages/poetry/packages/package.py in author_name() at line 153
   return self._get_author()['name']
 /home/user/.local/lib/python3.6/site-packages/poetry/packages/package.py in _get_author() at line 168
   name = m.group('name')

I think the email should be allowed to be empty, which means that this should not crash.

@blueyed blueyed changed the title AttributeError with author entry with missing email AttributeError with missing email in authors entry Apr 22, 2018
@sdispater
Copy link
Member

If you look at the documentation (https://poetry.eustace.io/docs/pyproject/#authors), it is specified that each author must be in the form name <email>

@blueyed
Copy link
Contributor Author

blueyed commented Apr 23, 2018

What about name <email|URL> then maybe alternatively?
I do not want to put my email everywhere when it's not really necessary.

@sdispater
Copy link
Member

@blueyed Commit 5b14bd1 in the develop makes the email address optional. It will be available in the next 0.9.0 release.

@sdispater
Copy link
Member

Release 0.9.0 is out!

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