#110 GitHub API rate limit exceeded when parsing contributor list
Opened 7 years ago by bowlofeggs. Modified 7 years ago

I hit this exception when trying to import Bodhi to GitHub:

 rbarlow  ⓔ  pagure-importer  ~  devel  pagure-importer  pgimport github
Enter your Github Username: bowlofeggs
Password: 
Enter github project name like pypingou/pagure: fedora-infra/bodhi
Do you want to generate jsons for project's contributers and issue commentors? [y/N]: y
contributor added: bowlofeggs
contributor added: jeremycline
contributor added: puiterwijk
contributor added: anazli
Traceback (most recent call last):
  File "/home/rbarlow/.virtualenvs/pagure-importer/bin/pgimport", line 11, in <module>
    load_entry_point('pagure-importer==2.2.1', 'console_scripts', 'pgimport')()
  File "/home/rbarlow/.virtualenvs/pagure-importer/lib/python3.5/site-packages/click-6.7-py3.5.egg/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/rbarlow/.virtualenvs/pagure-importer/lib/python3.5/site-packages/click-6.7-py3.5.egg/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/rbarlow/.virtualenvs/pagure-importer/lib/python3.5/site-packages/click-6.7-py3.5.egg/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/rbarlow/.virtualenvs/pagure-importer/lib/python3.5/site-packages/click-6.7-py3.5.egg/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/rbarlow/.virtualenvs/pagure-importer/lib/python3.5/site-packages/click-6.7-py3.5.egg/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/rbarlow/.virtualenvs/pagure-importer/lib/python3.5/site-packages/pagure_importer-2.2.1-py3.5.egg/pagure_importer/commands/github.py", line 29, in github
    gh_get_contributors(username, password, project)
  File "/home/rbarlow/.virtualenvs/pagure-importer/lib/python3.5/site-packages/pagure_importer-2.2.1-py3.5.egg/pagure_importer/utils/__init__.py", line 117, in gh_get_contributors
    contributor = {'fullname': commit.author.name,
  File "/home/rbarlow/.virtualenvs/pagure-importer/lib/python3.5/site-packages/PyGithub-1.31-py3.5.egg/github/NamedUser.py", line 221, in name
    self._completeIfNotSet(self._name)
  File "/home/rbarlow/.virtualenvs/pagure-importer/lib/python3.5/site-packages/PyGithub-1.31-py3.5.egg/github/GithubObject.py", line 251, in _completeIfNotSet
    self._completeIfNeeded()
  File "/home/rbarlow/.virtualenvs/pagure-importer/lib/python3.5/site-packages/PyGithub-1.31-py3.5.egg/github/GithubObject.py", line 255, in _completeIfNeeded
    self.__complete()
  File "/home/rbarlow/.virtualenvs/pagure-importer/lib/python3.5/site-packages/PyGithub-1.31-py3.5.egg/github/GithubObject.py", line 260, in __complete
    self._url.value
  File "/home/rbarlow/.virtualenvs/pagure-importer/lib/python3.5/site-packages/PyGithub-1.31-py3.5.egg/github/Requester.py", line 172, in requestJsonAndCheck
    return self.__check(*self.requestJson(verb, url, parameters, headers, input, cnx))
  File "/home/rbarlow/.virtualenvs/pagure-importer/lib/python3.5/site-packages/PyGithub-1.31-py3.5.egg/github/Requester.py", line 180, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.RateLimitExceededException: 403 {'documentation_url': 'https://developer.github.com/v3/#rate-limiting', 'message': "API rate limit exceeded for 82.202.112.233. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)"}

A workaround might be to clone the repository and use the git log to find the contributors.

Metadata Update from @cverna:
- Issue assigned to cverna

7 years ago

Metadata Update from @vivekanand1101:
- Issue tagged with: github

7 years ago

Login to comment on this ticket.

Metadata