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

python migration_manager.py Error #7

Open
chw9852 opened this issue Dec 2, 2015 · 2 comments
Open

python migration_manager.py Error #7

chw9852 opened this issue Dec 2, 2015 · 2 comments

Comments

@chw9852
Copy link

chw9852 commented Dec 2, 2015

when I run python migration_manager.py, output as below, my server is local gitlab setup by myself.
any suggestion?

Skipping Redmine issue: 65 (start at 66)

(1) Loading redmine issue: [66] from file [00066.json]

Attempt to create issue: [#66][wangwang]
Milestone: hades5.0
Traceback (most recent call last):
File "migration_manager.py", line 228, in
mm.migrate_issues()
File "migration_manager.py", line 200, in migrate_issues
github_issue_number = gm.make_github_issue(json_fname_fullpath, *_gm_kwargs)
File "/home/jielun/redmine2github-master/src/github_issues/github_issue_maker.py", line 345, in make_github_issue
milestone_number = self.milestone_manager.get_create_milestone(rd)
File "/home/jielun/redmine2github-master/src/github_issues/milestone_helper.py", line 181, in get_create_milestone
milestone_number = self.get_create_milestone_number(mstone_name)
File "/home/jielun/redmine2github-master/src/github_issues/milestone_helper.py", line 106, in get_create_milestone_number
mnum = self.get_mile_stone_number(title)
File "/home/jielun/redmine2github-master/src/github_issues/milestone_helper.py", line 136, in get_mile_stone_number
for page in milestones:
File "/usr/lib/python2.7/site-packages/pygithub3/core/result/base.py", line 100, in next
return self.next()
File "/usr/lib/python2.7/site-packages/pygithub3/core/result/smart.py", line 91, in next
if self.page <= self.pages:
File "/usr/lib/python2.7/site-packages/pygithub3/core/result/smart.py", line 101, in pages
return self.getter.last
File "/usr/lib/python2.7/site-packages/pygithub3/core/result/smart.py", line 47, in last
self()
File "/usr/lib/python2.7/site-packages/pygithub3/core/result/smart.py", line 16, in wrapper
return func(self, page)
File "/usr/lib/python2.7/site-packages/pygithub3/core/result/smart.py", line 39, in call
response = self.method(page=page)
File "/usr/lib/python2.7/site-packages/pygithub3/core/client.py", line 84, in get
response = self.request('get', request, *_kwargs)
File "/usr/lib/python2.7/site-packages/pygithub3/core/client.py", line 71, in wrapper
return func(self, verb, request, **kwargs)
File "/usr/lib/python2.7/site-packages/pygithub3/core/client.py", line 80, in request
GithubError(response).process()
File "/usr/lib/python2.7/site-packages/pygithub3/core/errors.py", line 35, in process
raise raise_error()
File "/usr/lib/python2.7/site-packages/pygithub3/core/errors.py", line 20, in error_404
raise NotFound("404 - %s" % self.debug.get('message'))
pygithub3.exceptions.NotFound: 404 - Not Found

@fuery
Copy link

fuery commented Apr 2, 2016

I personally ran into the same error. In my particular case, the authentication credentials were not correct. I couldn't get the local.py settings to work per the documentation, but everything worked fine for me when I hardcoded my credentials in the github_get_auth method in src/settings/base.py. See https://github.com/IQSS/redmine2github/blob/master/src/settings/base.py#L61

While I winced a little at doing it (hardcoded creds? ugh), this is a presumably one-off operation, so I went for it.

Hope this helps someone.

@chronon
Copy link

chronon commented Aug 5, 2016

Thanks for the tip, @fuery. I also ran into the same problem, and got around it by removing getpass.getpass on this line of my config file and using a personal access token. Basically this:

GITHUB_PASSWORD_OR_PERSONAL_ACCESS_TOKEN = 'Enter github pw:'

Instead of this

GITHUB_PASSWORD_OR_PERSONAL_ACCESS_TOKEN = getpass.getpass('Enter github pw:')

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

3 participants