Skip to content

Crash after migrating a few issues  #27

@eXpl0it3r

Description

@eXpl0it3r

So I've been trying to move all the issues from the official Box2D Google Code project to GitHub, but for some reason it always fails with the Bad credentials exception.
Since it works for x numbers of issues and only then errors out, it's definitely not a problem of my credentials and my guess would rather be, that the GitHub API blocks after a certain amount of calls, but I've no experience in that area.

Here's the output:

C:\Dev\Python27\Scripts>python migrateissues.py box2d eXpl0it3r Box2D
Github password:
Retrieving existing Github issues...
Retrieved 376 issues; identifying ones already migrated...
Adding issue 1, adding comments..
[...]
Adding issue 75
Adding issue 76, adding comments..
Adding issue 77, adding comments......................
Adding issue 78Usage: migrateissues.py [options] <google project name> <github username> <github project>

Migrate all issues from a Google Code project to a Github project.

Options:
  -h, --help            show this help message and exit
  -a, --assign-owner    Assign owned issues to the Github user
  -b BASE_ID, --base-id=BASE_ID
                        Number of issues in Github before migration
  -d, --dry-run         Don't modify anything on Github
  -p, --omit-priority   Don't migrate priority labels
  -s, --synchronize-ids
                        Ensure that migrated issues keep the same ID
Traceback (most recent call last):
  File "migrateissues.py", line 360, in <module>
    process_gcode_issues(existing_issues)
  File "migrateissues.py", line 279, in process_gcode_issues
    add_comments_to_issue(github_issue, gid)
  File "migrateissues.py", line 191, in add_comments_to_issue
    existing_comments = [ comment.body for comment in github_issue.get_comments() ]
  File "C:\Dev\Python27\lib\site-packages\github\PaginatedList.py", line 35, in __iter__
    newElements = self.__grow()
  File "C:\Dev\Python27\lib\site-packages\github\PaginatedList.py", line 47, in __grow
    newElements = self._fetchNextPage()
  File "C:\Dev\Python27\lib\site-packages\github\PaginatedList.py", line 104, in _fetchNextPage
    headers, data = self.__requester.requestJsonAndCheck("GET", self.__nextUrl, self.__nextParams, None)
  File "C:\Dev\Python27\lib\site-packages\github\Requester.py", line 84, in requestJsonAndCheck
    return self.__check(*self.requestJson(verb, url, parameters, input))
  File "C:\Dev\Python27\lib\site-packages\github\Requester.py", line 92, in __check
    raise GithubException.GithubException(status, output)
github.GithubException.GithubException: 401 {u'message': u'Bad credentials'}

Restarting it again mostly leads to duplication of issues and since it never really finishes (never reached issue 302), I basically can't migrate everything.

Does anyone know if there's some API limitation that errors out with Bad credentials or see where the error might originate from otherwise?

Besides that, it would be great if one could specify an issue number, from where the script should start from copying, since it takes quite a bit to skip over one issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions