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

Crash after migrating a few issues #27

Open
eXpl0it3r opened this issue Mar 7, 2013 · 6 comments
Open

Crash after migrating a few issues #27

eXpl0it3r opened this issue Mar 7, 2013 · 6 comments

Comments

@eXpl0it3r
Copy link

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.

@danielniccoli
Copy link
Contributor

It looks like that this problem occurs only on machines with a fast internet connection. No Problems at home (down 16MB, up 640KB), same problem when running this script from a 100MB/100MB connection.

Edit: No, it has nothing to do with the connection.

@danielniccoli
Copy link
Contributor

Oh, and this repository is dead. Check the forks under the Network tab for more recent versions.

@eXpl0it3r
Copy link
Author

Ah hadn't thought of looking at the forks, thanks!

Too bad people abandon their projects like this. :-\

@danielniccoli
Copy link
Contributor

I don't like it either. I asked Arthur to at least write a quick note into the README. It was obviously asked too much. He also did not pull my quick fixes. Check the forks, find one you like and contribute to that, if you feel like it.

@danielniccoli
Copy link
Contributor

@eXpl0it3r you also could check my fork. No guarantee, but I think my fork does not produce duplicates. At least, not that I remember :)

@eXpl0it3r
Copy link
Author

I already starred your fork, so I can easily find it again, but I don't have the time to working with it, so I will certainly check it out later. ;)
Thanks for everything.

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