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

Exception when a user has no name #103

Closed
jayvdb opened this issue Aug 14, 2018 · 0 comments
Closed

Exception when a user has no name #103

jayvdb opened this issue Aug 14, 2018 · 0 comments

Comments

@jayvdb
Copy link
Contributor

jayvdb commented Aug 14, 2018

On https://github.com/coala/gh-board, the following all cause an exception:

{'user_name': 'domlobo', 'name': None}
{'user_name': 'greenkeeper[bot]', 'name': None}
{'user_name': 'brentirwin', 'name': None}
{'user_name': 'adjohnson916', 'name': None}
{'user_name': 'domlobo', 'name': None}
{'user_name': 'brentirwin', 'name': None}
{'user_name': 'ANURADHAJHA99', 'name': None}
All Contributors:
Traceback (most recent call last):
  File "/home/jayvdb/.local/bin/octohatrack", line 11, in <module>
    load_entry_point('octohatrack', 'console_scripts', 'octohatrack')()
  File "/home/jayvdb/projects/ghuser/octohatrack/octohatrack/__main__.py", line 53, in main
    display_results(repo_name, contributors, len(api))
  File "/home/jayvdb/projects/ghuser/octohatrack/octohatrack/helpers.py", line 16, in display_results
    for user in sorted(contributors, key=lambda k: k['name'].lower()):
  File "/home/jayvdb/projects/ghuser/octohatrack/octohatrack/helpers.py", line 16, in <lambda>
    for user in sorted(contributors, key=lambda k: k['name'].lower()):
AttributeError: 'NoneType' object has no attribute 'lower'
jayvdb added a commit to jayvdb/octohatrack that referenced this issue Aug 14, 2018
A user without a name causes an exception, and
the dedup algorithm also merged users without
a name as all of their names were `None`.

Fixes LABHR#103
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

1 participant