Skip to content

Error adding a project member #14

@dpasqualin

Description

@dpasqualin

I'm trying to add a project member and this is the error I get (I'm assuming this is the way to do it...):

"p" is a valid project
"apz11" is a valid user

Question: if I'm doing the right way, how could I set the user access level?

In [51]: p.Member(apz11.id)
---------------------------------------------------------------------------
GitlabGetError                            Traceback (most recent call last)
/home/dpasqualin/<ipython-input-51-883ffbbcc9a9> in <module>()
----> 1 p.Member(apz11.id)

/usr/local/lib/python2.7/dist-packages/python_gitlab-0.5-py2.7.egg/gitlab.pyc in Member(self, id, **kwargs)
    968         return self._getListOrObject(ProjectMember, id,
    969                                      project_id=self.id,
--> 970                                      **kwargs)
    971 
    972     def MergeRequest(self, id=None, **kwargs):

/usr/local/lib/python2.7/dist-packages/python_gitlab-0.5-py2.7.egg/gitlab.pyc in _getListOrObject(self, cls, id, **kwargs)
    477             if not cls.canGet:
    478                 raise GitlabGetError
--> 479             return cls(self.gitlab, id, **kwargs)
    480 
    481     def _getObject(self, k, v):

/usr/local/lib/python2.7/dist-packages/python_gitlab-0.5-py2.7.egg/gitlab.pyc in __init__(self, gl, data, **kwargs)
    529 
    530         if data is None or isinstance(data, int) or isinstance(data, str):
--> 531             data = self.gitlab.get(self.__class__, data, **kwargs)
    532 
    533         self._setFromDict(data)

/usr/local/lib/python2.7/dist-packages/python_gitlab-0.5-py2.7.egg/gitlab.pyc in get(self, obj_class, id, **kwargs)
    242             raise GitlabAuthenticationError(r.json()['message'])
    243         elif r.status_code == 404:
--> 244             raise GitlabGetError("Object doesn't exist")
    245         else:
    246             raise GitlabGetError('%d: %s' % (r.status_code, r.text))

GitlabGetError: Object doesn't exist

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions