Unhandled AttributeError in 'poetry install': 'NoneType' object has no attribute 'group'
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).
macOS-10.15.5
:1.0.9
:
pyproject.toml
[tool.poetry]
name = "uncolor"
version = "0.1.0"
description = "strips ANSI colors from a data stream"
authors = ["Ryan Delaney <ryan.patrick.delaney@protonmail.com"]
classifiers = [ ]
[tool.poetry.dependencies]
python = "^3.7"
ansicolors = "^1.1.8"
[tool.poetry.dev-dependencies]
pytest = "^5.2"
black = "19.10b0"
flake8 = "^3.8.3"
flake8-breakpoint = "^1.1.0"
flake8-bugbear = "^20.1.4"
flake8-builtins = "^1.5.3"
pytest-mock = "^3.1.1"
pytest-icdiff = "^0.5"
[tool.poetry.scripts]
foo = "uncolor:main"
[tool.black]
line-length = 79
target_version = ["py37"]
[tool.isort]
[settings]
combine_star = true
# default_section =
# force_to_top =
# forced_separate =
include_trailing_comma = true
indent=' '
known_first_party = []
known_third_party = []
length_sort = false
line_length = 79
multi_line_output = 3
# no_lines_before =
# skip =
# skip_glob =
use_parentheses = true
# verbose =
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
Issue
Possibly related to #2372
When performing poetry install
using this pyproject.toml file, I am met with an AttributeError:
$ poetry install -vvv
Using virtualenv: /Users/ryan/src/me/uncolor/.venv
Installing dependencies from lock file
No dependencies to install or update
- Skipping zipp (3.1.0) Already installed
- Skipping importlib-metadata (1.6.1) Already installed
- Skipping pyparsing (2.4.7) Already installed
- Skipping six (1.15.0) Already installed
- Skipping atomicwrites (1.4.0) Not needed for the current environment
- Skipping attrs (19.3.0) Already installed
- Skipping colorama (0.4.3) Not needed for the current environment
- Skipping mccabe (0.6.1) Already installed
- Skipping more-itertools (8.3.0) Already installed
- Skipping packaging (20.4) Already installed
- Skipping pluggy (0.13.1) Already installed
- Skipping py (1.8.1) Already installed
- Skipping pycodestyle (2.6.0) Already installed
- Skipping pyflakes (2.2.0) Already installed
- Skipping wcwidth (0.2.4) Already installed
- Skipping appdirs (1.4.4) Already installed
- Skipping click (7.1.2) Already installed
- Skipping flake8 (3.8.3) Already installed
- Skipping flake8-plugin-utils (1.3.0) Already installed
- Skipping icdiff (1.9.1) Already installed
- Skipping pathspec (0.8.0) Already installed
- Skipping pprintpp (0.4.0) Already installed
- Skipping pytest (5.4.3) Already installed
- Skipping regex (2020.6.8) Already installed
- Skipping toml (0.10.1) Already installed
- Skipping typed-ast (1.4.1) Already installed
- Skipping ansicolors (1.1.8) Already installed
- Skipping black (19.10b0) Already installed
- Skipping flake8-breakpoint (1.1.0) Already installed
- Skipping flake8-bugbear (20.1.4) Already installed
- Skipping flake8-builtins (1.5.3) Already installed
- Skipping pytest-icdiff (0.5) Already installed
- Skipping pytest-mock (3.1.1) Already installed
[AttributeError]
'NoneType' object has no attribute 'group'
Traceback (most recent call last):
File "/Users/ryan/.local/pipx/venvs/poetry/lib/python3.7/site-packages/clikit/console_application.py", line 131, in run
status_code = command.handle(parsed_args, io)
File "/Users/ryan/.local/pipx/venvs/poetry/lib/python3.7/site-packages/clikit/api/command/command.py", line 120, in handle
status_code = self._do_handle(args, io)
File "/Users/ryan/.local/pipx/venvs/poetry/lib/python3.7/site-packages/clikit/api/command/command.py", line 171, in _do_handle
return getattr(handler, handler_method)(args, io, self)
File "/Users/ryan/.local/pipx/venvs/poetry/lib/python3.7/site-packages/cleo/commands/command.py", line 92, in wrap_handle
return self.handle()
File "/Users/ryan/.local/pipx/venvs/poetry/lib/python3.7/site-packages/poetry/console/commands/install.py", line 78, in handle
builder = EditableBuilder(self.poetry, self._env, NullIO())
File "/Users/ryan/.local/pipx/venvs/poetry/lib/python3.7/site-packages/poetry/masonry/builders/builder.py", line 71, in __init__
self._meta = Metadata.from_package(self._package)
File "/Users/ryan/.local/pipx/venvs/poetry/lib/python3.7/site-packages/poetry/masonry/metadata.py", line 54, in from_package
meta.author = package.author_name
File "/Users/ryan/.local/pipx/venvs/poetry/lib/python3.7/site-packages/poetry/packages/package.py", line 138, in author_name
return self._get_author()['name']
File "/Users/ryan/.local/pipx/venvs/poetry/lib/python3.7/site-packages/poetry/packages/package.py", line 166, in _get_author
name = m.group('name')
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
'NoneType' object has no attribute 'group' - Stack Overflow
The error is in your line 11, your re.search is returning no results, ie None , and then you're trying to call fmtre.group...
Read more >How To Fix Error: 'NoneType' Object Has No Attribute 'Group'?
In Python, an attribute can be considered as any property associated with a particular type of object.
Read more >How To Fix Attribute Error: 'NoneType' Object Has ... - YouTube
Article Link: https://blog.finxter.com/how-to-fix-error- nonetype - object - has - no - attribute - group / Email Academy: ...
Read more >[Solved] AttributeError: Nonetype Object Has No Attribute Group
“AttributeError Nonetype object has no attribute group” is the error raised by the python interpreter when it fails to fetch or access “group...
Read more >str object has no attribute decode python Code Example
It doesn't seem to be a Python package or a valid path to a data directory. AttributeError: module 'google.protobuf.descriptor' has no attribute '_ ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hello @rpdelaney,
this is essentialy a duplicate of https://github.com/python-poetry/poetry/issues/1143, because you have a malformed author:
must become
But yes, we have to improve the error message here.
fin swimmer
I have the same error as @bostevensspinakr , but when trying to run
poetry init
. It therefore has nothing to do with my applicationEDIT: just realized this only happens in bash for windows.