question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AttributeError caused by author field, breaking `poetry build`

See original GitHub issue
  • 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).

Issue

poetry build -f sdist

With author field in pyproject.toml

authors = ["R&D <researchanddevelopment@example.com>"]

Output:

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

Perhaps this is for a good reason, but it confused me for a long while because I didn’t know this meant something was wrong in my pyproject.toml file. It would be useful to have indications of toml validation problems by field.

Changed to:

authors = ["Research Development <researchanddevelopment@example.com>"]

Works, and that is fine. Just didn’t know there were validation rules for these strings.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
kam1shcommented, Mar 28, 2019

@nackjicholson What do you think, maybe replacing 'NoneType' object has no attribute 'group' to Invalid project's author: "author (author@example.com)" would be enough?

1reaction
kam1shcommented, Mar 15, 2019

Faced this problem today, on version 0.12.11 (Python 3.7.2). Had this field in pyproject.toml:
authors = ["support@example.com]

Changed to authors = ["Example support <support@example.com>"], works fine.

I’ll try to fix this on this or next weekend, because it looks like obvious regex mismatch.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AttributeError caused by author field, breaking `poetry build` · Issue ...
I am on the latest Poetry version. I have searched the issues of this repo and believe that this is not a duplicate....
Read more >
History | Poetry - Python dependency management and ...
Fix an issue where the source field of a dependency with extras was ignored ... all the output of a command resulted in...
Read more >
Poetry add <package> returns AttributeError - Stack Overflow
I am trying to create a Python package using poetry. I haven't been able to replicate the steps described in documentation.
Read more >
YAML: The Missing Battery in Python
Serialize Python's built-in and custom data types to YAML; Safely read YAML documents from untrusted sources; Take control of parsing YAML ...
Read more >
pytest-factoryboy Documentation
There is a possibility to pass keyword parameters in order to override factory attribute values during fixture registration.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found