Problem with Python api Member.groups.fetch_all()

  • 1
  • Problem
  • Updated 12 months ago
Archived and Closed

This conversation is no longer open for comments or replies and is no longer visible to community members. The community moderator provided the following reason for archiving: EOL Clean up

If I fetch a member using `pt = acct.members.find_one_by_email('pt....gmail.com')`, and I want to see what groups they belong to, I naturally think I'm going to do`pt.groups.fetch_all()` but I'm getting "NoneType has no attribute update". It appears that `fetch_all()` calls `paginated_get` which calls `get_next` which calls `get`, but with no "params" argument and so it's trying to call update on None:
params.update(self.pagination_add_ons())
In this line. Should I raise an issue on github?
Photo of Paul Tomblin

Paul Tomblin

  • 6 Posts
  • 0 Reply Likes

Posted 12 months ago

  • 1
Photo of Andrew Heuback

Andrew Heuback, Official Rep

  • 142 Posts
  • 12 Reply Likes
Hey Paul! 

The API wrappers found at api.myemma.com are built by community members and we're limited in the support we can offer on those (in this case, the Python wrapper was built by a former Emma employee). With that being said, I am going to check with our engineers and I'll let you know if I find anything on this.

In the meanwhile, you can accomplish this by making this call using an API tool (such as Postman):
http://api.myemma.com/api/external/members.html#get--#account_id-members-#member_id-groups
Photo of Paul Tomblin

Paul Tomblin

  • 6 Posts
  • 0 Reply Likes
I've submitted some pull requests on the github for a couple of fixes that I think should be in the Python API. Is anybody maintaining it, because I'm not seeing any activity since February.
Photo of Andrew Heuback

Andrew Heuback, Official Rep

  • 142 Posts
  • 12 Reply Likes
I'll check in on those as well, Paul, and let you know what I find out. Thanks!
Photo of Andrew Heuback

Andrew Heuback, Official Rep

  • 142 Posts
  • 12 Reply Likes
Hi Paul.

I'm checking in to let you know that updates to this wrapper are on our roadmap. While I don't have a specific time estimate on this, I'll definitely let you know here once I know more information.

Thanks for bringing this to our attention!
Photo of Andrew Heuback

Andrew Heuback, Official Rep

  • 142 Posts
  • 12 Reply Likes
Hey Paul! I received word that our developers have made the suggested changes to our wrapper! Thanks again.