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

Unable to create issue using oAuth token #132

Closed
kodeshpa opened this issue Jan 23, 2013 · 3 comments
Closed

Unable to create issue using oAuth token #132

kodeshpa opened this issue Jan 23, 2013 · 3 comments
Assignees
Labels

Comments

@kodeshpa
Copy link

Hi,

I am trying to create an issue using library. But always get GithubException: 404 {u'message': u'Not Found'} error message . Please help

my code looks as fellow. let me know if i am doing something wrong

repo_service = Github('Token')
repo_service.get_repo('Repo Name').create_issue('test', 'TestSam', assignee=None, milestone=None, labels = None)

@jacquev6
Copy link
Member

It would be easier with a stack trace of the exception :-) With the information you gave, I can't know which part fails.

I assume you have the same exception with just

g = Github('Token')
g.get_repo('Repo Name')

because you don't use the full name of the repo.

Here is an example of how to create an issue on jacquev6/PyGithub:

g = Github(token)
repo = g.get_user("jacquev6").get_repo("PyGithub")  # or repo = g.get_repo("jacquev6/PyGithub")
issue = repo.create_issue("Issue title")

I hope it helps, do not hesitate to tell me if you still have problems.

@ghost ghost assigned jacquev6 Jan 24, 2013
@kodeshpa
Copy link
Author

(Pdb) Traceback (most recent call last):
File "/Users/app/views.py", line 162, in github
issue1 = repo.create_issue("Issue title", "issue body")
File "/Library/Python/2.7/site-packages/github/Repository.py", line 375, in create_issue
post_parameters
File "/Library/Python/2.7/site-packages/github/Requester.py", line 80, in requestAndCheck
raise GithubException.GithubException(status, output)
GithubException: 404 {u'message': u'Not Found'}

Hope this helps. Let me know how can i get additional info

@jpmens
Copy link

jpmens commented Mar 23, 2019

For anybody finding this in future: I was attempting the same, also with a Github Personal Token, but the token didn't have sufficient priviledges, and the Github API returns 404 then.

Adding public_repo rights to the token solved the problem, and I was then able to create new issues programatically.

airjp818

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants