Skip to content
This repository was archived by the owner on Oct 24, 2022. It is now read-only.
This repository was archived by the owner on Oct 24, 2022. It is now read-only.

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

@hhebbo

Description

@hhebbo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions