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

Failed to POST issue status code 404 #88

Open
jaraco opened this issue Jun 4, 2017 · 8 comments
Open

Failed to POST issue status code 404 #88

jaraco opened this issue Jun 4, 2017 · 8 comments

Comments

@jaraco
Copy link
Collaborator

jaraco commented Jun 4, 2017

Attempting to migrate a repo, I get the same error reported in later in #63:

$ python migrate.py yougov/fuzzy yougov/fuzzy bb-migration
Please enter your GitHub password.
Note: If your GitHub account has authentication enabled, you must use a personal access token from https://github.com/settings/tokens in place of a password for this script.

Traceback (most recent call last):
  File "migrate.py", line 538, in <module>
    sys.exit(main(options))
  File "migrate.py", line 179, in main
    gh_issue, gh_comments, options.github_repo, options.gh_auth, headers
  File "migrate.py", line 497, in push_github_issue
    .format(issue['title'], respo.status_code)
RuntimeError: Failed to POST issue: 'soundex modifies input argument' due to unexpected HTTP status code: 404

I read the README, as suggested, but I don't see any relevant hint there. I double-checked that the import API docs linked from the README are don't indicate anything about the API having gone away.

404 means Not Found, and the URL that's not found is https://api.github.com/repos/yougov/fuzzy/import/issues.

I'll be deleting that repo shortly, but I just confirmed that I'm able to create issues with the bb-migration user in that repo, so it's not an access issue. That account is not enabled for 2FA, so that shouldn't be an issue either.

@jaraco
Copy link
Collaborator Author

jaraco commented Jun 4, 2017

Aha, so I tried with my main user account (jaraco) and that worked. Probably the issue is that bb-migration user isn't admin on the org/repo. Perhaps we should extend the script to give a hint -- if a 404 is returned for the initial issue post, ask if the user is admin on the repo.

@jeffwidman
Copy link
Owner

jeffwidman commented Jun 5, 2017

I'm confused, were you not an admin on github or BB side?

Hinting would be fine, but I wonder if there's an API we can hit that checks the permissions level of the user to actually know if that's the underlying issue or not?

@jaraco
Copy link
Collaborator Author

jaraco commented Jun 7, 2017

Github side. Yes, better would be to detect the necessary conditions directly.

@asottile
Copy link
Contributor

Also hit this as well -- fixed it by adding the deadsnakes-issues-bot to the deadsnakes org for my import :)

@Nikratio
Copy link

I have the same problem, and Nikratio is an admin on the s3ql/s3ql repo - any idea?

$ python3 migrate.py --skip-attribution-for nikratio nikratio/s3ql s3ql/s3ql Nikratio 
Please enter your GitHub password.
Note: If your GitHub account has authentication enabled, you must use a personal access token from https://github.com/settings/tokens in place of a password for this script.

getting issues from bitbucket
done, loaded 300 issues
Traceback (most recent call last):
  File "migrate.py", line 690, in <module>
    sys.exit(main(options))
  File "migrate.py", line 209, in main
    gh_issue, gh_comments, options.github_repo, options.gh_auth, headers
  File "migrate.py", line 640, in push_github_issue
    .format(issue['title'], respo.status_code)
RuntimeError: Failed to POST issue: 'Blocking fusermount and umount' due to unexpected HTTP status code: 404

@jeffwidman
Copy link
Owner

@Nikratio can you open a new issue? I have a hunch this is a different issue (tbh, most likely user-error, but maybe not) than what this ticket is about

@fmuecke
Copy link

fmuecke commented Dec 30, 2020

I had the same issue with 404 response and it tuned out that copy & paste did not properly paste the auth token on windows so I had to type it in manually.

@beroe
Copy link

beroe commented Sep 8, 2023

I had this problem and needed to generate an auth token instead of password.
I also had to comment out line 278 where it says assert gh_issue_id == issue['id'] That kept failing for me, although the issues were getting created a few at a time.
When it works, the script is MIRACULOUS. So amazed that it can map over all the threads and tags, etc. Much appreciated.

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

6 participants