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: 'NoneType' object has no attribute 'groupdict' #8

Open
pbuyle opened this issue Oct 28, 2014 · 2 comments
Open

AttributeError: 'NoneType' object has no attribute 'groupdict' #8

pbuyle opened this issue Oct 28, 2014 · 2 comments

Comments

@pbuyle
Copy link

pbuyle commented Oct 28, 2014

When trying to install the ANXS.nodejs role, I get the following error.

$ arm install ANXS.nodejs
fetching `ANXS.nodejs` from Galaxy
Traceback (most recent call last):
  File "/usr/local/bin/arm", line 5, in <module>
    main()
  File "/usr/local/lib/python2.7/dist-packages/arm/main.py", line 48, in main
    args.func(args)
  File "/usr/local/lib/python2.7/dist-packages/arm/commands/install.py", line 42, in run
    roles = self._fetch(argv.role_or_module, argv.no_deps, roles )
  File "/usr/local/lib/python2.7/dist-packages/arm/commands/install.py", line 75, in _fetch
    return retrieve_all_roles(role_ident, alias, roles)
  File "/usr/local/lib/python2.7/dist-packages/arm/util.py", line 37, in retrieve_all_roles
    identifier, alias = split_alias_identifier(role)
  File "/usr/local/lib/python2.7/dist-packages/arm/util.py", line 52, in split_alias_identifier
    return alias_match.groupdict()['identifier'], None
AttributeError: 'NoneType' object has no attribute 'groupdict'

I got a similar error when trying to install it from the GitHub repository

$ arm install git+https://github.com/ANXS/nodejs.git#alias=ANXS.nodejs
fetching `git+https://github.com/ANXS/nodejs.git#alias=ANXS.nodejs` from git
Traceback (most recent call last):
  File "/usr/local/bin/arm", line 5, in <module>
    main()
  File "/usr/local/lib/python2.7/dist-packages/arm/main.py", line 48, in main
    args.func(args)
  File "/usr/local/lib/python2.7/dist-packages/arm/commands/install.py", line 42, in run
    roles = self._fetch(argv.role_or_module, argv.no_deps, roles )
  File "/usr/local/lib/python2.7/dist-packages/arm/commands/install.py", line 75, in _fetch
    return retrieve_all_roles(role_ident, alias, roles)
  File "/usr/local/lib/python2.7/dist-packages/arm/util.py", line 22, in retrieve_all_roles
    role = retrieve_role(identifier)
  File "/usr/local/lib/python2.7/dist-packages/arm/util.py", line 13, in retrieve_role
    return route.fetch(identifier)
  File "/usr/local/lib/python2.7/dist-packages/arm/routes/__init__.py", line 90, in fetch
    _uid = self._uid(identifier)
  File "/usr/local/lib/python2.7/dist-packages/arm/routes/git.py", line 35, in _uid
    pattern_info = pattern_match.groupdict()
AttributeError: 'NoneType' object has no attribute 'groupdict'

And again, a similar error when trying a forked repo.

$ arm install "git+https://github.com/Couto/nodejs.git@anxs#alias=ANXS.nodejs"
fetching `git+https://github.com/Couto/nodejs.git@anxs#alias=ANXS.nodejs` from git
Traceback (most recent call last):
  File "/usr/local/bin/arm", line 5, in <module>
    main()
  File "/usr/local/lib/python2.7/dist-packages/arm/main.py", line 48, in main
    args.func(args)
  File "/usr/local/lib/python2.7/dist-packages/arm/commands/install.py", line 42, in run
    roles = self._fetch(argv.role_or_module, argv.no_deps, roles )
  File "/usr/local/lib/python2.7/dist-packages/arm/commands/install.py", line 75, in _fetch
    return retrieve_all_roles(role_ident, alias, roles)
  File "/usr/local/lib/python2.7/dist-packages/arm/util.py", line 22, in retrieve_all_roles
    role = retrieve_role(identifier)
  File "/usr/local/lib/python2.7/dist-packages/arm/util.py", line 13, in retrieve_role
    return route.fetch(identifier)
  File "/usr/local/lib/python2.7/dist-packages/arm/routes/__init__.py", line 90, in fetch
    _uid = self._uid(identifier)
  File "/usr/local/lib/python2.7/dist-packages/arm/routes/git.py", line 35, in _uid
    pattern_info = pattern_match.groupdict()
AttributeError: 'NoneType' object has no attribute 'groupdict'
@pbuyle
Copy link
Author

pbuyle commented Oct 28, 2014

I also have the same error when installing another role (https://github.com/Pheromone/ansible-forever) via Git, the role install just fine when using Ansible Galaxy. I noticed the issue with this role when exporting the installed roles to a requirements.txt file via the freeze, and then install roles using this file.

$ arm install --upgrade git+https://github.com/Pheromone/ansible-forever.git
fetching `git+https://github.com/Pheromone/ansible-forever.git` from git
Traceback (most recent call last):
  File "/usr/local/bin/arm", line 5, in <module>
    main()
  File "/usr/local/lib/python2.7/dist-packages/arm/main.py", line 48, in main
    args.func(args)
  File "/usr/local/lib/python2.7/dist-packages/arm/commands/install.py", line 42, in run
    roles = self._fetch(argv.role_or_module, argv.no_deps, roles )
  File "/usr/local/lib/python2.7/dist-packages/arm/commands/install.py", line 75, in _fetch
    return retrieve_all_roles(role_ident, alias, roles)
  File "/usr/local/lib/python2.7/dist-packages/arm/util.py", line 22, in retrieve_all_roles
    role = retrieve_role(identifier)
  File "/usr/local/lib/python2.7/dist-packages/arm/util.py", line 13, in retrieve_role
    return route.fetch(identifier)
  File "/usr/local/lib/python2.7/dist-packages/arm/routes/__init__.py", line 90, in fetch
    _uid = self._uid(identifier)
  File "/usr/local/lib/python2.7/dist-packages/arm/routes/git.py", line 35, in _uid
    pattern_info = pattern_match.groupdict()
AttributeError: 'NoneType' object has no attribute 'groupdict'

@mmulich
Copy link

mmulich commented May 27, 2015

This seems to be fixed in master. The author likely needs to make a PyPI release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants