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

Adding a collaborator to a repo returns pygithub3.exceptions.BadRequest: 400 - Problems parsing JSON #64

Open
hhebbo opened this issue Aug 15, 2017 · 0 comments

Comments

@hhebbo
Copy link

@hhebbo hhebbo commented Aug 15, 2017

I'm trying to add a collaborator to a repo with:

gh.repos.collaborators.add("collaborator-name", "name", "repo")

but I'm getting:

pygithub3.exceptions.BadRequest: 400 - Problems parsing JSON

Here is the full stack:

Traceback (most recent call last):
  File "./test.py", line 8, in <module>
    collaborators = gh.repos.collaborators.add("collaborator-name", "name", "repo")
  File "/Library/Python/2.7/site-packages/pygithub3/services/repos/collaborators.py", line 40, in add
    return self._put(request)
  File "/Library/Python/2.7/site-packages/pygithub3/services/base.py", line 129, in _put
    response = self._client.put(request, data=input_data, **kwargs)
  File "/Library/Python/2.7/site-packages/pygithub3/core/client.py", line 100, in put
    response = self.request('put', request, **kwargs)
  File "/Library/Python/2.7/site-packages/pygithub3/core/client.py", line 71, in wrapper
    return func(self, verb, request, **kwargs)
  File "/Library/Python/2.7/site-packages/pygithub3/core/client.py", line 81, in request
    GithubError(response).process()
  File "/Library/Python/2.7/site-packages/pygithub3/core/errors.py", line 35, in process
    raise raise_error()
  File "/Library/Python/2.7/site-packages/pygithub3/core/errors.py", line 23, in error_400
    raise BadRequest("400 - %s" % self.debug.get('message'))
pygithub3.exceptions.BadRequest: 400 - Problems parsing JSON

I tried deleting and listing, they both work fine, but adding doesn't work. Could you please advice? Thanks.

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

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.