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

AttributeError: 'Member' object has no attribute 'badges' #332

Open
tgrandje opened this issue Dec 11, 2020 · 0 comments
Open

AttributeError: 'Member' object has no attribute 'badges' #332

tgrandje opened this issue Dec 11, 2020 · 0 comments

Comments

@tgrandje
Copy link
Contributor

tgrandje commented Dec 11, 2020

I've seen there were closed issues about this (maybe not about Member objects, I'm not positive about this), but using the last version of py-trello it still happens.

So let's go :

import trello
api_key = "..."
api_secret = "..."
token = "..."
id_board = '...'
client = trello.TrelloClient(api_key=api_key, api_secret=api_secret, token=token)
board = client.get_board(id_board)
users = board.all_members()
first_user_comments = users[0].fetch_comments()

This will raise AttributeError: 'Member' object has no attribute 'badges'.

I've teste a change of fetch_comments (line 36 of member.py)

def fetch_comments(self):
        comments = self.client.fetch_json(
            '/members/' + self.id + '/actions',
            query_params={'filter': 'commentCard'})
        return sorted(comments, key=lambda comment: comment['date'])

This works fine (with or without comments) ; I just don't know if it is worth a commit regarding the issue from last year...
Let me know what you think about it.

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

No branches or pull requests

1 participant