The below fails using scrunch even though the user_email is definitely known to Crunch. Switching to the UI to add the member there instead succeeds.
>>> team = scrunch.get_team(team_name)
>>> team.members.add(user_email)
KeyErrorTraceback (most recent call last)
<ipython-input-11-ed5ef572543b> in <module>()
1 inq = scrunch.get_team('Affiliate Poland: Inquiry')
----> 2 inq.members.add('o.podbielska@inquiry.com.pl')
c:\users\jamesg\documents\techops\dev\scrunch\scrunch\datasets.pyc in add(self, member, edit)
381 :return: None
382 """
--> 383 member = self._validate_member(member)
384 self.resource.members.patch({member.url: {
385 'permissions': {self._EDIT_ATTRIBUTE: edit}
c:\users\jamesg\documents\techops\dev\scrunch\scrunch\datasets.pyc in _validate_member(self, member)
365 member = get_team(member)
366 except:
--> 367 raise KeyError('Member %s is not a Team nor a User' % member)
368 return member
369
KeyError: 'Member XXX is not a Team nor a User'
The below fails using scrunch even though the
user_email
is definitely known to Crunch. Switching to the UI to add the member there instead succeeds.